{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4018b877",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import importlib\n",
    "import sys\n",
    "\n",
    "PATH_TO_LIB = \"XXX\"  # PATH TO LIBRARY\n",
    "sys.path.append(PATH_TO_LIB)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "477b84c1",
   "metadata": {},
   "source": [
    "### В данной части протестим написанную библиотеку и доступные данные Мосбиржи.\n",
    "\n",
    "Частично будем править либу (данный раздел - часть функционального тестирования).\n",
    "\n",
    "Весь рабочий функционла содержится в класса MoexApi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "f3b25e9a",
   "metadata": {},
   "outputs": [],
   "source": [
    "import api_lib.main as api\n",
    "import api_lib.dictionaries as _dictionar_\n",
    "import api_lib.mixins as _mixins_\n",
    "\n",
    "MOEX = api.MoexApi()\n",
    "\n",
    "def reload_moex():\n",
    "    importlib.reload(_dictionar_)\n",
    "    importlib.reload(_mixins_)\n",
    "    importlib.reload(api)\n",
    "    global MOEX\n",
    "    MOEX = api.MoexApi()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 150,
   "id": "296ff2d9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Для запроса данных используйте метод request!\n",
      "Список базовых сущностей хранится в переменной 'available_entities'\n",
      "Виды бумаг хранятся в переменной 'SECTYPE'\n",
      "Срочность опциона хранится в переменной 'OPTION_SERIES_TYPE'\n",
      "Все доступные API можно посмотреть вызвав all_api()\n",
      "Описание API можно посмотреть вызвав api_description\n",
      "Описание глобальной сущности можно получить вызвав description\n"
     ]
    }
   ],
   "source": [
    "MOEX.help()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "id": "f0a7f4fc",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['OPTION_SERIES_TYPE',\n",
       " 'SECTYPE',\n",
       " 'all_api',\n",
       " 'api_description',\n",
       " 'available_entities',\n",
       " 'boardgroups',\n",
       " 'boards',\n",
       " 'datatypes',\n",
       " 'description',\n",
       " 'durations',\n",
       " 'engines',\n",
       " 'help',\n",
       " 'indexids',\n",
       " 'markets',\n",
       " 'report_names',\n",
       " 'request',\n",
       " 'securitycollections',\n",
       " 'securitygroups',\n",
       " 'securitytypes',\n",
       " 'sessions']"
      ]
     },
     "execution_count": 142,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Методы и справочники: \n",
    "[data for data in dir(MOEX) if not data.startswith(\"_\")]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ed5e6290",
   "metadata": {},
   "source": [
    "#### Базовые справочники. Используйте их для формирования запросов\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "id": "af771d30",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OPTION_SERIES_TYPE:\n",
      "{'D': 'дневной', 'W': 'недельный', 'M': 'месячный', 'Q': 'квартальный'} \n",
      "\n",
      "SECTYPE:\n",
      "{'1': 'Акция обыкновенная', '2': 'Акция привилегированная', '3': 'Государственные облигации', '4': 'Региональные облигации', '5': 'Облигации центральных банков', '6': 'Корпоративные облигации', '7': 'Облигации МФО', '8': 'Биржевые облигации', '9': 'Паи открытых ПИФов', 'A': 'Паи интервальных ПИФов', 'B': 'Паи закрытых ПИФов', 'C': 'Муниципальные облигации', 'D': 'Депозитарные расписки', 'E': 'Бумаги иностранных инвестиционных фондов (ETF)', 'F': 'Ипотечный сертификат', 'G': 'Корзина бумаг', 'H': 'Доп. идентификатор списка', 'I': 'ETC (товарные инструменты)', 'J': 'Пай биржевого ПИФа (Exchange Investment Unit share)'} \n",
      "\n",
      "available_entities:\n",
      "['boardgroups', 'boards', 'datatypes', 'durations', 'engines', 'indexids', 'markets', 'report_names', 'securitycollections', 'securitygroups', 'securitytypes', 'sessions'] \n",
      "\n",
      "boardgroups:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>market_id</th>\n",
       "      <th>market_name</th>\n",
       "      <th>title</th>\n",
       "      <th>is_default</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>is_order_driven</th>\n",
       "      <th>category</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>stock_index</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>Индексы</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_inav</th>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>INAV</td>\n",
       "      <td>0</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_mmix</th>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>Money Market IndeX</td>\n",
       "      <td>0</td>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_namex</th>\n",
       "      <td>1028</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>Индексы НТБ</td>\n",
       "      <td>0</td>\n",
       "      <td>1028</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_pf</th>\n",
       "      <td>1153</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>Ценовой фиксинг</td>\n",
       "      <td>0</td>\n",
       "      <td>1153</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     id  trade_engine_id trade_engine_name  \\\n",
       "name                                                         \n",
       "stock_index           9                1             stock   \n",
       "stock_index_inav    104                1             stock   \n",
       "stock_index_mmix    155                1             stock   \n",
       "stock_index_namex  1028                1             stock   \n",
       "stock_index_pf     1153                1             stock   \n",
       "\n",
       "                                 trade_engine_title  market_id market_name  \\\n",
       "name                                                                         \n",
       "stock_index        Фондовый рынок и рынок депозитов          5       index   \n",
       "stock_index_inav   Фондовый рынок и рынок депозитов          5       index   \n",
       "stock_index_mmix   Фондовый рынок и рынок депозитов          5       index   \n",
       "stock_index_namex  Фондовый рынок и рынок депозитов          5       index   \n",
       "stock_index_pf     Фондовый рынок и рынок депозитов          5       index   \n",
       "\n",
       "                                title  is_default  board_group_id  is_traded  \\\n",
       "name                                                                           \n",
       "stock_index                   Индексы           1               9          1   \n",
       "stock_index_inav                 INAV           0             104          1   \n",
       "stock_index_mmix   Money Market IndeX           0             155          1   \n",
       "stock_index_namex         Индексы НТБ           0            1028          1   \n",
       "stock_index_pf        Ценовой фиксинг           0            1153          1   \n",
       "\n",
       "                   is_order_driven category  \n",
       "name                                         \n",
       "stock_index                    NaN     main  \n",
       "stock_index_inav               NaN     main  \n",
       "stock_index_mmix               NaN     main  \n",
       "stock_index_namex              NaN     main  \n",
       "stock_index_pf                 NaN     main  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "boards:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>engine_id</th>\n",
       "      <th>market_id</th>\n",
       "      <th>board_title</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>has_candles</th>\n",
       "      <th>is_primary</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>boardid</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>TQIF</th>\n",
       "      <td>177</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Т+: Паи - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TQTF</th>\n",
       "      <td>178</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Т+: ETF - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TQBR</th>\n",
       "      <td>129</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Т+: Акции и ДР - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TQBS</th>\n",
       "      <td>130</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Т+: А2-Акции и паи - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>TQNL</th>\n",
       "      <td>131</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Т+: Б-Акции и паи - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          id  board_group_id  engine_id  market_id  \\\n",
       "boardid                                              \n",
       "TQIF     177              57          1          1   \n",
       "TQTF     178              57          1          1   \n",
       "TQBR     129              57          1          1   \n",
       "TQBS     130              57          1          1   \n",
       "TQNL     131              57          1          1   \n",
       "\n",
       "                            board_title  is_traded  has_candles  is_primary  \n",
       "boardid                                                                      \n",
       "TQIF                Т+: Паи - безадрес.          1            1           1  \n",
       "TQTF                Т+: ETF - безадрес.          1            1           1  \n",
       "TQBR         Т+: Акции и ДР - безадрес.          1            1           1  \n",
       "TQBS     Т+: А2-Акции и паи - безадрес.          0            1           1  \n",
       "TQNL      Т+: Б-Акции и паи - безадрес.          0            1           1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "datatypes:\n",
      "['securities', 'trades'] \n",
      "\n",
      "durations:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>duration</th>\n",
       "      <th>days</th>\n",
       "      <th>title</th>\n",
       "      <th>hint</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>interval</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>60</td>\n",
       "      <td>None</td>\n",
       "      <td>минута</td>\n",
       "      <td>1м</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>600</td>\n",
       "      <td>None</td>\n",
       "      <td>10 минут</td>\n",
       "      <td>10м</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>3600</td>\n",
       "      <td>None</td>\n",
       "      <td>час</td>\n",
       "      <td>1ч</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>86400</td>\n",
       "      <td>None</td>\n",
       "      <td>день</td>\n",
       "      <td>1д</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>604800</td>\n",
       "      <td>None</td>\n",
       "      <td>неделя</td>\n",
       "      <td>1н</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          duration  days     title hint\n",
       "interval                               \n",
       "1               60  None    минута   1м\n",
       "10             600  None  10 минут  10м\n",
       "60            3600  None       час   1ч\n",
       "24           86400  None      день   1д\n",
       "7           604800  None    неделя   1н"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "engines:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>stock</th>\n",
       "      <td>1</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>state</th>\n",
       "      <td>2</td>\n",
       "      <td>Рынок ГЦБ (размещение)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>currency</th>\n",
       "      <td>3</td>\n",
       "      <td>Валютный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>futures</th>\n",
       "      <td>4</td>\n",
       "      <td>Срочный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>commodity</th>\n",
       "      <td>5</td>\n",
       "      <td>Товарный рынок</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           id                             title\n",
       "name                                           \n",
       "stock       1  Фондовый рынок и рынок депозитов\n",
       "state       2            Рынок ГЦБ (размещение)\n",
       "currency    3                    Валютный рынок\n",
       "futures     4                     Срочный рынок\n",
       "commodity   5                    Товарный рынок"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "indexids:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>shortname</th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>indexid</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>IMOEX</th>\n",
       "      <td>Индекс МосБиржи</td>\n",
       "      <td>2001-01-03</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MOEX10</th>\n",
       "      <td>Индекс МосБиржи 10</td>\n",
       "      <td>2008-05-27</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>RTSI</th>\n",
       "      <td>Индекс РТС</td>\n",
       "      <td>2009-09-30</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MOEXBC</th>\n",
       "      <td>Индекс голубых фишек</td>\n",
       "      <td>2010-01-14</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>MOEXBMI</th>\n",
       "      <td>Индекс широкого рынка</td>\n",
       "      <td>2011-12-30</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                     shortname        from        till\n",
       "indexid                                               \n",
       "IMOEX          Индекс МосБиржи  2001-01-03  2023-05-31\n",
       "MOEX10      Индекс МосБиржи 10  2008-05-27  2023-05-31\n",
       "RTSI                Индекс РТС  2009-09-30  2023-05-31\n",
       "MOEXBC    Индекс голубых фишек  2010-01-14  2023-05-31\n",
       "MOEXBMI  Индекс широкого рынка  2011-12-30  2023-05-31"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "markets:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>market_title</th>\n",
       "      <th>market_id</th>\n",
       "      <th>marketplace</th>\n",
       "      <th>is_otc</th>\n",
       "      <th>has_history_files</th>\n",
       "      <th>has_history_trades_files</th>\n",
       "      <th>has_trades</th>\n",
       "      <th>has_history</th>\n",
       "      <th>has_candles</th>\n",
       "      <th>has_orderbook</th>\n",
       "      <th>has_tradingsession</th>\n",
       "      <th>has_extra_yields</th>\n",
       "      <th>has_delay</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>market_name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>index</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Индексы фондового рынка</td>\n",
       "      <td>5</td>\n",
       "      <td>INDICES</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>shares</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Рынок акций</td>\n",
       "      <td>1</td>\n",
       "      <td>MXSE</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>bonds</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Рынок облигаций</td>\n",
       "      <td>2</td>\n",
       "      <td>MXSE</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ndm</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Режим переговорных сделок</td>\n",
       "      <td>4</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>otc</th>\n",
       "      <td>29</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>ОТС</td>\n",
       "      <td>29</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             id  trade_engine_id trade_engine_name  \\\n",
       "market_name                                          \n",
       "index         5                1             stock   \n",
       "shares        1                1             stock   \n",
       "bonds         2                1             stock   \n",
       "ndm           4                1             stock   \n",
       "otc          29                1             stock   \n",
       "\n",
       "                           trade_engine_title               market_title  \\\n",
       "market_name                                                                \n",
       "index        Фондовый рынок и рынок депозитов    Индексы фондового рынка   \n",
       "shares       Фондовый рынок и рынок депозитов                Рынок акций   \n",
       "bonds        Фондовый рынок и рынок депозитов            Рынок облигаций   \n",
       "ndm          Фондовый рынок и рынок депозитов  Режим переговорных сделок   \n",
       "otc          Фондовый рынок и рынок депозитов                        ОТС   \n",
       "\n",
       "             market_id marketplace  is_otc  has_history_files  \\\n",
       "market_name                                                     \n",
       "index                5     INDICES       0                1.0   \n",
       "shares               1        MXSE       0                1.0   \n",
       "bonds                2        MXSE       0                1.0   \n",
       "ndm                  4        None       0                1.0   \n",
       "otc                 29        None       0                0.0   \n",
       "\n",
       "             has_history_trades_files  has_trades  has_history  has_candles  \\\n",
       "market_name                                                                   \n",
       "index                             0.0         1.0          1.0            1   \n",
       "shares                            1.0         1.0          1.0            1   \n",
       "bonds                             1.0         1.0          1.0            1   \n",
       "ndm                               1.0         1.0          1.0            0   \n",
       "otc                               0.0         0.0          1.0            0   \n",
       "\n",
       "             has_orderbook  has_tradingsession  has_extra_yields  has_delay  \n",
       "market_name                                                                  \n",
       "index                  0.0                   1                 0          0  \n",
       "shares                 1.0                   1                 0          1  \n",
       "bonds                  1.0                   1                 1          1  \n",
       "ndm                    0.0                   1                 1          1  \n",
       "otc                    0.0                   0                 0          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "report_names:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>description</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>report_name</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>numtrades</th>\n",
       "      <td>Информация о количестве договоров по инструмен...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>participants</th>\n",
       "      <td>Информация о количестве лиц, имеющих открытые ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>openpositions</th>\n",
       "      <td>Информация об открытых позициях по инструмента...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>expirationparticipants</th>\n",
       "      <td>Информация о количестве лиц, имеющих открытые ...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>expirationopenpositions</th>\n",
       "      <td>Информация об объеме открытых позиций по догов...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                               description\n",
       "report_name                                                               \n",
       "numtrades                Информация о количестве договоров по инструмен...\n",
       "participants             Информация о количестве лиц, имеющих открытые ...\n",
       "openpositions            Информация об открытых позициях по инструмента...\n",
       "expirationparticipants   Информация о количестве лиц, имеющих открытые ...\n",
       "expirationopenpositions  Информация об объеме открытых позиций по догов..."
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "securitycollections:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "      <th>security_group_id</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>stock_index_all</th>\n",
       "      <td>72</td>\n",
       "      <td>Все индексы</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_shares</th>\n",
       "      <td>213</td>\n",
       "      <td>Основные индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_shares_sectoral</th>\n",
       "      <td>210</td>\n",
       "      <td>Отраслевые индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_total_return</th>\n",
       "      <td>249</td>\n",
       "      <td>Индексы акций полной доходности</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_index_shares_thematic</th>\n",
       "      <td>211</td>\n",
       "      <td>Тематические индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                              id                            title  \\\n",
       "name                                                                \n",
       "stock_index_all               72                      Все индексы   \n",
       "stock_index_shares           213           Основные индексы акций   \n",
       "stock_index_shares_sectoral  210         Отраслевые индексы акций   \n",
       "stock_index_total_return     249  Индексы акций полной доходности   \n",
       "stock_index_shares_thematic  211       Тематические индексы акций   \n",
       "\n",
       "                             security_group_id  \n",
       "name                                            \n",
       "stock_index_all                             12  \n",
       "stock_index_shares                          12  \n",
       "stock_index_shares_sectoral                 12  \n",
       "stock_index_total_return                    12  \n",
       "stock_index_shares_thematic                 12  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "securitygroups:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>title</th>\n",
       "      <th>is_hidden</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>stock_index</th>\n",
       "      <td>12</td>\n",
       "      <td>Индексы</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_shares</th>\n",
       "      <td>4</td>\n",
       "      <td>Акции</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stock_bonds</th>\n",
       "      <td>3</td>\n",
       "      <td>Облигации</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>currency_selt</th>\n",
       "      <td>9</td>\n",
       "      <td>Валюта</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>futures_forts</th>\n",
       "      <td>10</td>\n",
       "      <td>Фьючерсы</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               id      title  is_hidden\n",
       "name                                   \n",
       "stock_index    12    Индексы          0\n",
       "stock_shares    4      Акции          0\n",
       "stock_bonds     3  Облигации          0\n",
       "currency_selt   9     Валюта          0\n",
       "futures_forts  10   Фьючерсы          0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "securitytypes:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>security_type_title</th>\n",
       "      <th>security_group_name</th>\n",
       "      <th>stock_type</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>security_type_name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>common_share</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Акция обыкновенная</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>preferred_share</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Акция привилегированная</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>depositary_receipt</th>\n",
       "      <td>51</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Депозитарная расписка</td>\n",
       "      <td>stock_dr</td>\n",
       "      <td>D</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ofz_bond</th>\n",
       "      <td>54</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Государственная облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>cb_bond</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>Облигация центрального банка</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                    id  trade_engine_id trade_engine_name  \\\n",
       "security_type_name                                          \n",
       "common_share         3                1             stock   \n",
       "preferred_share      1                1             stock   \n",
       "depositary_receipt  51                1             stock   \n",
       "ofz_bond            54                1             stock   \n",
       "cb_bond              4                1             stock   \n",
       "\n",
       "                                  trade_engine_title  \\\n",
       "security_type_name                                     \n",
       "common_share        Фондовый рынок и рынок депозитов   \n",
       "preferred_share     Фондовый рынок и рынок депозитов   \n",
       "depositary_receipt  Фондовый рынок и рынок депозитов   \n",
       "ofz_bond            Фондовый рынок и рынок депозитов   \n",
       "cb_bond             Фондовый рынок и рынок депозитов   \n",
       "\n",
       "                             security_type_title security_group_name  \\\n",
       "security_type_name                                                     \n",
       "common_share                  Акция обыкновенная        stock_shares   \n",
       "preferred_share         Акция привилегированная         stock_shares   \n",
       "depositary_receipt         Депозитарная расписка            stock_dr   \n",
       "ofz_bond               Государственная облигация         stock_bonds   \n",
       "cb_bond             Облигация центрального банка         stock_bonds   \n",
       "\n",
       "                   stock_type  \n",
       "security_type_name             \n",
       "common_share                1  \n",
       "preferred_share             2  \n",
       "depositary_receipt          D  \n",
       "ofz_bond                    3  \n",
       "cb_bond                     5  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "sessions:\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>description</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>sessions</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Основная сессия</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Вечерняя сессия</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Итого (все сессии)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Утренняя сессия</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 description\n",
       "sessions                    \n",
       "1            Основная сессия\n",
       "2            Вечерняя сессия\n",
       "3         Итого (все сессии)\n",
       "0            Утренняя сессия"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n"
     ]
    }
   ],
   "source": [
    "for d in ['OPTION_SERIES_TYPE', 'SECTYPE', 'available_entities', 'boardgroups', 'boards', \n",
    "          'datatypes', 'durations', 'engines', 'indexids', 'markets', 'report_names', \n",
    "          'securitycollections', 'securitygroups', 'securitytypes', 'sessions']:\n",
    "    print(d + \":\")\n",
    "    attr = getattr(MOEX, d)\n",
    "    if isinstance(attr, pd.DataFrame):\n",
    "        display(attr[:5])\n",
    "        print()\n",
    "    else:\n",
    "        print(attr, \"\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "id": "e1e55dbf",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method description in module api_lib.main:\n",
      "\n",
      "description(entity: str, name) -> str method of api_lib.main.MoexApi instance\n",
      "    Получить описание сущности.\n",
      "    :param entity: тип сущности в единственном числе.\n",
      "    :param name: имя сущности.\n",
      "    :return: Описание сущности.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Доступные методы: ['all_api', 'api_description', 'description', 'request']\n",
    "help(MOEX.description)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "id": "29ac1027",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Депозитарная расписка\n",
      "Валюта\n",
      "Индексы акций полной доходности\n",
      "                          market_title\n",
      "market_name                           \n",
      "ndm          Режим переговорных сделок\n",
      "ndm                Внесистемные сделки\n",
      "ndm                     Облигации c ЦК\n"
     ]
    }
   ],
   "source": [
    "print(MOEX.description(\"securitytype\", \"depositary_receipt\"))\n",
    "print(MOEX.description(\"securitygroup\", \"currency_selt\"))\n",
    "print(MOEX.description(\"securitycollection\", \"stock_index_total_return\"))\n",
    "print(MOEX.description(\"market\", \"ndm\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "id": "ccc3efbc",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "Entity 'blablalbla' is not found!",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[165], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mMOEX\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mdescription\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mblablalbla\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mqwert\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m)\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\main.py:90\u001b[0m, in \u001b[0;36mMoexApi.description\u001b[1;34m(self, entity, name)\u001b[0m\n\u001b[0;32m     88\u001b[0m use_entity \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mgetattr\u001b[39m(\u001b[38;5;28mself\u001b[39m, entities, \u001b[38;5;28;01mNone\u001b[39;00m)\n\u001b[0;32m     89\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m use_entity \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m---> 90\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNameError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEntity \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mentity\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m is not found!\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m     91\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(use_entity, pd\u001b[38;5;241m.\u001b[39mDataFrame):\n\u001b[0;32m     92\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mEntity \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mentity\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m hasn\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mt description\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n",
      "\u001b[1;31mNameError\u001b[0m: Entity 'blablalbla' is not found!"
     ]
    }
   ],
   "source": [
    "print(MOEX.description(\"blablalbla\", \"qwert\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1334dd6c",
   "metadata": {},
   "source": [
    "#### Ниже список всех доступных поинтов. ID поинта используется для запроса!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "863b18f3",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5 Список бумаг торгуемых на московской бирже.\n",
      "13 Получить спецификацию инструмента.\n",
      "24 Получить сводные обороты по рынкам\n",
      "26 Получить интервал дат, доступных в истории для рынка по заданному режиму торгов.\n",
      "28 Получить глобальные справочники ISS.\n",
      "32 Получить таблицу инструментов по режиму торгов.\n",
      "33 Получить таблицу инструментов торговой сессии по рынку в целом.\n",
      "34 Получить все сделки по выбранному режиму торгов.\n",
      "35 Получить все сделки рынка.\n",
      "40 Получить доступные торговые системы.\n",
      "41 Получить описание и режим работы торговой системы.\n",
      "42 Получить список рынков торговой системы.\n",
      "43 Получить справочник режимов торгов рынка.\n",
      "44 Получить описание: словарь доступных режимов торгов, описание полей публикуемых таблиц данных и т.д.\n",
      "45 Получить справочник групп режимов торгов.\n",
      "46 Получить свечи указанного инструмента по выбранному режиму торгов.\n",
      "48 Получить период дат рассчитанных свечей.\n",
      "49 Получить описание режима торгов.\n",
      "50 Получить описание группы режимов торгов.\n",
      "52 Получить данные по конкретному инструменту рынка.\n",
      "53 Получить данные по указанному инструменту на выбранном режиме торгов.\n",
      "55 Получить сделки по инструменту.\n",
      "56 Получить все сделки указанного инструмента по выбранному режиму торгов.\n",
      "61 Получить интервал дат в истории для указанного рынка и бумаги.\n",
      "62 Получить историю по всем бумагам на рынке за одну дату.\n",
      "63 Получить историю по одной бумаге на рынке за интервал дат.\n",
      "64 Получить историю торгов для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "65 Получить историю торгов для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "66 Получить интервал дат в истории, за которые доступна указанная бумага на рынке на указанном режиме торгов.\n",
      "83 Получить даты, за которые доступны данные на указанных рынке и торговой системе.\n",
      "89 Получить данные по кривой бескупонной доходности(Прекращены расчеты с 2018-01-03)\n",
      "95 Получить текущее значение оборотов торговой сессии по рынкам торговой системы\n",
      "96 Получить текущее значение оборота по рынку\n",
      "100 Получить описание полей для запросов оборотов по рынку/торговой системе.\n",
      "114 Список годов, за которые существуют ссылки на файлы с архивом сделок и исторической биржевой информацией. datatype может принимать значения securities или trades.\n",
      "115 Список месяцев в году, за которые существуют ссылки на файлы с архивом сделок и исторической биржевой информацией. datatype может принимать значения securities или trades.\n",
      "118 Список неторгуемых инструментов с указанием интервалов торгуемости по режимам\n",
      "119 Получить данные по листингу бумаг в историческом разрезе по указанному режиму\n",
      "123 Информация по техническому изменению торговых кодов\n",
      "127 Группы ценных бумаг\n",
      "128 Группа ценных бумаг\n",
      "129 Коллекции ценных бумаг входящие в группу\n",
      "130 Коллекция ценных бумаг входящие в группу\n",
      "131 Описание инструментов\n",
      "134 Показатели для определения критериев существенного отклонения\n",
      "146 Индексы фондового рынка\n",
      "147 Аналитические показатели за дату\n",
      "148 Список тикеров за все время торгов\n",
      "155 Получить свечи указанного инструмента по дефолтной группе режимов.\n",
      "156 Интервалы свечей, доступных к запросу по ФИ\n",
      "157 Получить свечи указанного инструмента по выбранной группе режимов торгов.\n",
      "159 Капитализация фондового рынка\n",
      "160 Список индексов в которые входит бумага\n",
      "161 Список режимов обобщенной информации по фондовому рынку\n",
      "162 Обобщенная информация по фондовому рынку\n",
      "165 РЕПО ГЦБ объемы (УСТАРЕЛО)\n",
      "166 РЕПО ГЦБ детали (УСТАРЕЛО)\n",
      "168 Курсы ЦБРФ\n",
      "169 Средневзвешенные ставки по операциям центрального банка\n",
      "171 Cписок акций, по которым рассчитывается рыночная котировка\n",
      "172 Коэффициенты корелляции фондового рынка\n",
      "178 Ставки РЕПО аукционов (ГЦБ)\n",
      "179 Описание полей для запроса ставок РЕПО аукционов (ГЦБ)\n",
      "191 Новости биржи\n",
      "192 Новость сайта\n",
      "193 Мероприятия биржи\n",
      "194 Контент мероприятия биржи\n",
      "195 Агрегированные показатели рынка облигаций\n",
      "196 Описание колонок по агрегированным показетелям рынка бондов\n",
      "205 Описание колонок бумаг входящих в индекс\n",
      "214 Агрегированные итоги торгов за дату по рынкам\n",
      "634 Кривые безкупонной доходности\n",
      "649 Текущие цены бумаг\n",
      "711 Индикативные курсы валют срочного рынка\n",
      "712 Индикативный курс валют срочного рынка\n",
      "715 Фиксинги Московской биржи\n",
      "716 Фиксинги Московской биржи\n",
      "758 Справочник дроблений и консолидаций бумаг фондового рынка\n",
      "767 Сводная статистика по клиентам с самым высоким нетто-потоком. Детали https://fs.moex.com/f/10374/netflow2-demo-en.html\n",
      "769 Сводная статистика по клиентам с самым высоким нетто-потоком. Запрос возможен с лагом -15 дней от текущего для 1 эшелона. Детали https://fs.moex.com/f/10374/netflow2-demo-en.html\n",
      "783 История изменения параметров КБД (Кривая Бескупоной Доходности).\n",
      "791 Получить историю рассчитанных доходностей для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "793 Получить историю доходностей по одной бумаге на рынке за интервал дат.\n",
      "795 Получить историю доходностей для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "797 Получить историю доходностей для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "807 Сводные остатки по фьючерсам на физ. и юр. лица.\n",
      "809 Сводные остатки по фьючерсам на физ. и юр. лица. Запрос возможен с лагом -15 дней, по коду фьючерса\n",
      "811 Список сессий доступных в итогах торгов. Только для фондового рынка!\n",
      "813 Получить историю по всем бумагам на рынке за одну дату.\n",
      "815 Получить историю торгов для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "817 Получить историю по одной бумаге на рынке за интервал дат.\n",
      "821 Получить историю торгов для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "823 Промежуточные \"Итоги дня\".Только для фондового рынка\n",
      "839 Бюллетени для индексов\n",
      "843 RUSFAR расшифровка показателей\n",
      "859 Будущие ставки для ценообразования нестандартных инструментов (деривативов)\n",
      "861 Будущие ставки для ценообразования нестандартных инструментов (деривативов)\n",
      "873 Опционные серии\n",
      "877 Опционные серии\n",
      "879 Объем торгов для опционной серии\n",
      "881 Доска опционов\n",
      "883 Открытые позиции по опционной серии\n",
      "885 Объем торгов для опционной серии\n",
      "923 Календарь расчетных дней\n",
      "927 Своп-кривые на рынке СПФИ\n",
      "933 НКД на конец месяца\n"
     ]
    }
   ],
   "source": [
    "MOEX.all_api()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "id": "3a202823",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function api_description in module api_lib.main:\n",
      "\n",
      "api_description(api_id: Union[str, int], full_description: bool = False)\n",
      "    Описание эндпоинтов. Используйте данный метод как справочник для формирования запросов.\n",
      "    :param api_id: id эндпоинта.\n",
      "    :param full_description: True/False. Дополнительно вернет ссылку на описание эндпоинта и его template.\n",
      "    :return: Описание возвращаемых сущностей, требуемых сущностей и параметров запроса.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(MOEX.api_description)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8014e7db",
   "metadata": {},
   "source": [
    "### Метод api_description вернет описание поинта. В нем будут перечислены доступные параметры, требуемые сущности и прочая полезная инфа"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "id": "f3de2533",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5: Список бумаг торгуемых на московской бирже.\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Список бумаг торгуемых на московской бирже.\n",
      "\n",
      "Параметры запроса:\n",
      "``q``: Поиск инструмента по части Кода, Названию, ISIN, Идентификатору Эмитента, Номеру гос.регистрации.\n",
      "Например: https://iss.moex.com/iss/securities.xml?q=MOEX\n",
      "Слова длиной менее трёх букв игнорируются. Если параметром передано два слова через пробел. То каждое должно быть длиной не менее трёх букв.. \n",
      "``engine``: \n",
      "``is_trading``: \n",
      "``market``: \n",
      "``group_by``: Группировать выводимый результат по полю. Доступны значения group и type.. \n",
      "``limit``: Количество выводимых инструментов (5, 10, 20,100). Значение по умолчанию: 100\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\r\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/5\n",
      "Темплейт: http://iss.moex.com/iss/securities\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(5, full_description=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "id": "6e1594b3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "56: Получить все сделки указанного инструмента по выбранному режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "trades: Перечень сделок\n",
      "dataversion: Версионность данных.\n",
      "trades_yields: Дополнительные доходности для сделок\n",
      "\n",
      "Параметры запроса:\n",
      "``tradeno``: Номер сделки, с которого следует начать возвращать данные.\n",
      "В данных возвращаются сделки начиная с номера переданной сделки переданого в параметре tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      "\n",
      "Сделки возвращаются в порядке их заключения. На срочном рынке номер более поздней сделки может быть менее номера предыдущей.\n",
      ". Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH. \n",
      "``limit``: Количество строк в данных. Доступные значения: 1, 10, 100, 1000, 5000. Значение по умолчанию: 5000\n",
      "``reversed``: обратный порядок сортировки. Значение по умолчанию: 0\n",
      "``previous_session``: Сделки предыдущей сессии для forts и options рынков.\n",
      "И для индексов.\n",
      ". Значение по умолчанию: 0\n",
      "``recno``: Только для срочного рынка (FORTS + OPTIONS).\n",
      "Фильтрация по полю RECNO (в порядке заключения сделок).\n",
      "\n",
      "Заменяет собой фильтр tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      ". Значение по умолчанию: 0\n",
      "``next_trade``: Не включать текущую сделку в выдачу.. Значение по умолчанию: 0\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``yielddatetype``: Тип доходности. Возможные значения\n",
      "- MBS\n",
      "- MATDATE\n",
      "- OFFERDATE. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/56\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities/{security}/trades\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(56, full_description=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ef6565da",
   "metadata": {},
   "source": [
    "## Перейдем к части самих запросов с MOEX API. За запросы отвечает метод request\n",
    "\n",
    "Данный метод проверяет корректность запрошенных параметров и сущностей (вернет ошибку, если что-то указанно некорректно), сформирует корректный GET запрос и соберет результат в единый фрейм если у эндпоинта пристуствует пагинация (возвращает ограниченное число записей)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "973a4066",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method request in module api_lib.main:\n",
      "\n",
      "request(api_id: Union[int, str], only_market_data: bool = False, blocks: List[str] = None, **kwargs: Any) -> Union[pandas.core.frame.DataFrame, Dict[str, pandas.core.frame.DataFrame]] method of api_lib.main.MoexApi instance\n",
      "    Запрос данных по API Мосбиржи:\n",
      "    :param api_id: указывается id поинта запроса данных;\n",
      "    :param only_market_data: включать или нет непосредственно рыночные данные. По умолчанию не указываем;\n",
      "    :param blocks: ответ может содержать несколько блоков данных и этот параметр позволяет выбрать только нужные.\n",
      "    См. список возвращаемых данных в справочнике эндпоинтов.\n",
      "    :param kwargs:\n",
      "    1. Обязательно указываем значения всех требуемых глобальных сущностей;\n",
      "    2. Указываем значения параметров;\n",
      "        2.1. Если имя параметра совпадает с именем глобальной сущности, то к имени параметра добавляем префикс 'P_',\n",
      "        например, \"P_market\" для параметра \"market\";\n",
      "        2.2. Если значений параметров несколько, передаем их в виде списка, например, securities = [\"GAZP\", \"LKOH\"]\n",
      "        2.3. Если имя параметра является ключевым атрибутом python, добавьте к имени '_', например: _from.\n",
      "        2.4. Если в имени параметра содержится '.' (точка), замените ее на двойное подчеркивание, например:\n",
      "        iss.reverse -> iss__reverse\n",
      "    3. Если хотим указать атрибутный состав полей для блока, то к имени блока добавляем префикс\n",
      "    'COLUMNS_'. Названия атрибутов перечисляем в списке. Например, COLUMNS_boardgroups = [\"slug\", \"is_default\"].\n",
      "    :return: Если запрашивается только одна сущность то вернется фрейм данных. Если много, то в словаре, где\n",
      "    ключом является имя сущности.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(MOEX.request)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "b4cc9706",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID = sorted(map(int, api.GLOBAL_API.keys()))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "38d507da",
   "metadata": {},
   "source": [
    "### Базовый пример запроса:\n",
    "\n",
    "1. Смотрим описание поинта.\n",
    "2. Формируем запрос. Указываем id поинта, имя инструмента, торгуемость, сортируем по типу, указываем нужные нам колонки.\n",
    "3. Играем с другими параметрами (в т.ч. и с корявыми)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 188,
   "id": "abc65f4f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5: Список бумаг торгуемых на московской бирже.\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Список бумаг торгуемых на московской бирже.\n",
      "\n",
      "Параметры запроса:\n",
      "``q``: Поиск инструмента по части Кода, Названию, ISIN, Идентификатору Эмитента, Номеру гос.регистрации.\n",
      "Например: https://iss.moex.com/iss/securities.xml?q=MOEX\n",
      "Слова длиной менее трёх букв игнорируются. Если параметром передано два слова через пробел. То каждое должно быть длиной не менее трёх букв.. \n",
      "``engine``: \n",
      "``is_trading``: \n",
      "``market``: \n",
      "``group_by``: Группировать выводимый результат по полю. Доступны значения group и type.. \n",
      "``limit``: Количество выводимых инструментов (5, 10, 20,100). Значение по умолчанию: 100\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\r\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "id": "11758acd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>secid</th>\n",
       "      <th>shortname</th>\n",
       "      <th>isin</th>\n",
       "      <th>type</th>\n",
       "      <th>group</th>\n",
       "      <th>primary_boardid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>ГМКНорНик</td>\n",
       "      <td>RU0007288411</td>\n",
       "      <td>common_share</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>TQBR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>RU000A105A61</td>\n",
       "      <td>НорНикБ1P2</td>\n",
       "      <td>RU000A105A61</td>\n",
       "      <td>exchange_bond</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>TQCB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>RU000A100VQ6</td>\n",
       "      <td>НорНикБ1P1</td>\n",
       "      <td>RU000A100VQ6</td>\n",
       "      <td>exchange_bond</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>TQCB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>RU000A1069N8</td>\n",
       "      <td>НорНик БО9</td>\n",
       "      <td>RU000A1069N8</td>\n",
       "      <td>exchange_bond</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>TQCB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>RU000A105NL3</td>\n",
       "      <td>НорНикБ1P6</td>\n",
       "      <td>RU000A105NL3</td>\n",
       "      <td>exchange_bond</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>TQOY</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1256</th>\n",
       "      <td>GK9750BR3</td>\n",
       "      <td>GMKN-6.23M140623PA9750</td>\n",
       "      <td>None</td>\n",
       "      <td>option</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>ROPD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1257</th>\n",
       "      <td>GK9750BS3</td>\n",
       "      <td>GMKN-9.23M190723PA9750</td>\n",
       "      <td>None</td>\n",
       "      <td>option</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>ROPD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1258</th>\n",
       "      <td>GK9750BT3</td>\n",
       "      <td>GMKN-9.23M160823PA9750</td>\n",
       "      <td>None</td>\n",
       "      <td>option</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>ROPD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1259</th>\n",
       "      <td>GK9750BU3</td>\n",
       "      <td>GMKN-9.23M200923PA9750</td>\n",
       "      <td>None</td>\n",
       "      <td>option</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>ROPD</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1260</th>\n",
       "      <td>GK9750BX3</td>\n",
       "      <td>GMKN-12.23M201223PA9750</td>\n",
       "      <td>None</td>\n",
       "      <td>option</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>ROPD</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1261 rows × 6 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "             secid                shortname          isin           type  \\\n",
       "0             GMKN                ГМКНорНик  RU0007288411   common_share   \n",
       "1     RU000A105A61               НорНикБ1P2  RU000A105A61  exchange_bond   \n",
       "2     RU000A100VQ6               НорНикБ1P1  RU000A100VQ6  exchange_bond   \n",
       "3     RU000A1069N8               НорНик БО9  RU000A1069N8  exchange_bond   \n",
       "4     RU000A105NL3               НорНикБ1P6  RU000A105NL3  exchange_bond   \n",
       "...            ...                      ...           ...            ...   \n",
       "1256     GK9750BR3   GMKN-6.23M140623PA9750          None         option   \n",
       "1257     GK9750BS3   GMKN-9.23M190723PA9750          None         option   \n",
       "1258     GK9750BT3   GMKN-9.23M160823PA9750          None         option   \n",
       "1259     GK9750BU3   GMKN-9.23M200923PA9750          None         option   \n",
       "1260     GK9750BX3  GMKN-12.23M201223PA9750          None         option   \n",
       "\n",
       "                group primary_boardid  \n",
       "0        stock_shares            TQBR  \n",
       "1         stock_bonds            TQCB  \n",
       "2         stock_bonds            TQCB  \n",
       "3         stock_bonds            TQCB  \n",
       "4         stock_bonds            TQOY  \n",
       "...               ...             ...  \n",
       "1256  futures_options            ROPD  \n",
       "1257  futures_options            ROPD  \n",
       "1258  futures_options            ROPD  \n",
       "1259  futures_options            ROPD  \n",
       "1260  futures_options            ROPD  \n",
       "\n",
       "[1261 rows x 6 columns]"
      ]
     },
     "execution_count": 195,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_nornik = MOEX.request(\n",
    "    5, \n",
    "    q='Норильский', \n",
    "    is_trading=1, \n",
    "    group_by=\"type\", \n",
    "    COLUMNS_securities=[\"secid\", \"shortname\", \"isin\", \"type\", \"group\", \"primary_boardid\"]\n",
    ")\n",
    "df_nornik\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "id": "0e9e94c0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>secid</th>\n",
       "      <th>shortname</th>\n",
       "      <th>regnumber</th>\n",
       "      <th>name</th>\n",
       "      <th>isin</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>emitent_id</th>\n",
       "      <th>emitent_title</th>\n",
       "      <th>emitent_inn</th>\n",
       "      <th>emitent_okpo</th>\n",
       "      <th>gosreg</th>\n",
       "      <th>type</th>\n",
       "      <th>group</th>\n",
       "      <th>primary_boardid</th>\n",
       "      <th>marketprice_boardid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6115</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>1-01-03163-D</td>\n",
       "      <td>УК Арсагера ПАО-ао</td>\n",
       "      <td>RU000A0JP0Q7</td>\n",
       "      <td>1</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>1-01-03163-D</td>\n",
       "      <td>common_share</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>TQBR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3259</td>\n",
       "      <td>RU000A0HGNG6</td>\n",
       "      <td>АрсагераФА</td>\n",
       "      <td>0363-75409054</td>\n",
       "      <td>ОПИФ Арсагера - фонд акций</td>\n",
       "      <td>RU000A0HGNG6</td>\n",
       "      <td>1</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0363-75409054</td>\n",
       "      <td>public_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>TQIF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6014</td>\n",
       "      <td>ARSA-001D</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>1-01-03163-D-001D</td>\n",
       "      <td>УК Арсагера ОАО-ао</td>\n",
       "      <td>RU000A0JP0Q7</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>1-01-03163-D-001D</td>\n",
       "      <td>common_share</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>EQNE</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3260</td>\n",
       "      <td>RU000A0HGNH4</td>\n",
       "      <td>ПИФАрсСИ</td>\n",
       "      <td>0364-75409132</td>\n",
       "      <td>Арсагера фонд смеш. инвестиц.</td>\n",
       "      <td>RU000A0HGNH4</td>\n",
       "      <td>0</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0364-75409132</td>\n",
       "      <td>public_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3275</td>\n",
       "      <td>RU000A0JC5V1</td>\n",
       "      <td>ПИФАрсЖС</td>\n",
       "      <td>0402-75409534</td>\n",
       "      <td>Арсагера- жилищное строит. ПИФ</td>\n",
       "      <td>RU000A0JC5V1</td>\n",
       "      <td>0</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0402-75409534</td>\n",
       "      <td>private_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>TQIF</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>5925</td>\n",
       "      <td>RU000A0JPJ84</td>\n",
       "      <td>ПИФАрсЖД</td>\n",
       "      <td>0852-75409273</td>\n",
       "      <td>ПИФ \"Арсагера ЖД\" УК Арсагера</td>\n",
       "      <td>RU000A0JPJ84</td>\n",
       "      <td>0</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0852-75409273</td>\n",
       "      <td>private_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6054</td>\n",
       "      <td>RU000A0JPMD2</td>\n",
       "      <td>ПИФАрc6.4</td>\n",
       "      <td>0439-75408664</td>\n",
       "      <td>Арсагера-акции 6.4 ПИФ</td>\n",
       "      <td>RU000A0JPMD2</td>\n",
       "      <td>0</td>\n",
       "      <td>1937.0</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0439-75408664</td>\n",
       "      <td>interval_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id         secid   shortname          regnumber  \\\n",
       "0  6115          ARSA    Арсагера       1-01-03163-D   \n",
       "1  3259  RU000A0HGNG6  АрсагераФА      0363-75409054   \n",
       "2  6014     ARSA-001D    Арсагера  1-01-03163-D-001D   \n",
       "3  3260  RU000A0HGNH4    ПИФАрсСИ      0364-75409132   \n",
       "4  3275  RU000A0JC5V1    ПИФАрсЖС      0402-75409534   \n",
       "5  5925  RU000A0JPJ84    ПИФАрсЖД      0852-75409273   \n",
       "6  6054  RU000A0JPMD2   ПИФАрc6.4      0439-75408664   \n",
       "\n",
       "                             name          isin  is_traded  emitent_id  \\\n",
       "0              УК Арсагера ПАО-ао  RU000A0JP0Q7          1      1937.0   \n",
       "1      ОПИФ Арсагера - фонд акций  RU000A0HGNG6          1      1937.0   \n",
       "2              УК Арсагера ОАО-ао  RU000A0JP0Q7          0         NaN   \n",
       "3   Арсагера фонд смеш. инвестиц.  RU000A0HGNH4          0      1937.0   \n",
       "4  Арсагера- жилищное строит. ПИФ  RU000A0JC5V1          0      1937.0   \n",
       "5   ПИФ \"Арсагера ЖД\" УК Арсагера  RU000A0JPJ84          0      1937.0   \n",
       "6          Арсагера-акции 6.4 ПИФ  RU000A0JPMD2          0      1937.0   \n",
       "\n",
       "                                       emitent_title emitent_inn emitent_okpo  \\\n",
       "0  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "1  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "2                                               None        None         None   \n",
       "3  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "4  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "5  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "6  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "\n",
       "              gosreg           type         group primary_boardid  \\\n",
       "0       1-01-03163-D   common_share  stock_shares            TQBR   \n",
       "1      0363-75409054    public_ppif    stock_ppif            TQIF   \n",
       "2  1-01-03163-D-001D   common_share  stock_shares            EQNE   \n",
       "3      0364-75409132    public_ppif    stock_ppif            TQIF   \n",
       "4      0402-75409534   private_ppif    stock_ppif            TQIF   \n",
       "5      0852-75409273   private_ppif    stock_ppif            TQIF   \n",
       "6      0439-75408664  interval_ppif    stock_ppif            TQIF   \n",
       "\n",
       "  marketprice_boardid  \n",
       "0                TQBR  \n",
       "1                TQIF  \n",
       "2                None  \n",
       "3                None  \n",
       "4                TQIF  \n",
       "5                None  \n",
       "6                None  "
      ]
     },
     "execution_count": 196,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MOEX.request(\n",
    "    5, \n",
    "    q='Арсагера', \n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "id": "24f8b4ad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>secid</th>\n",
       "      <th>shortname</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>isin</th>\n",
       "      <th>type</th>\n",
       "      <th>group</th>\n",
       "      <th>primary_boardid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ARSA</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>1</td>\n",
       "      <td>RU000A0JP0Q7</td>\n",
       "      <td>common_share</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>TQBR</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>RU000A0HGNG6</td>\n",
       "      <td>АрсагераФА</td>\n",
       "      <td>1</td>\n",
       "      <td>RU000A0HGNG6</td>\n",
       "      <td>public_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          secid   shortname  is_traded          isin          type  \\\n",
       "0          ARSA    Арсагера          1  RU000A0JP0Q7  common_share   \n",
       "1  RU000A0HGNG6  АрсагераФА          1  RU000A0HGNG6   public_ppif   \n",
       "\n",
       "          group primary_boardid  \n",
       "0  stock_shares            TQBR  \n",
       "1    stock_ppif            TQIF  "
      ]
     },
     "execution_count": 197,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MOEX.request(\n",
    "    5, \n",
    "    q='Арсагера', \n",
    "    is_trading=1, \n",
    "    group_by=\"group\", \n",
    "    COLUMNS_securities=[\"secid\", \"shortname\", \"is_traded\", \"isin\", \"type\", \"group\", \"primary_boardid\"]\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "id": "341603f1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>secid</th>\n",
       "      <th>shortname</th>\n",
       "      <th>regnumber</th>\n",
       "      <th>name</th>\n",
       "      <th>isin</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>emitent_id</th>\n",
       "      <th>emitent_title</th>\n",
       "      <th>emitent_inn</th>\n",
       "      <th>emitent_okpo</th>\n",
       "      <th>gosreg</th>\n",
       "      <th>type</th>\n",
       "      <th>group</th>\n",
       "      <th>primary_boardid</th>\n",
       "      <th>marketprice_boardid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5925</td>\n",
       "      <td>RU000A0JPJ84</td>\n",
       "      <td>ПИФАрсЖД</td>\n",
       "      <td>0852-75409273</td>\n",
       "      <td>ПИФ \"Арсагера ЖД\" УК Арсагера</td>\n",
       "      <td>RU000A0JPJ84</td>\n",
       "      <td>0</td>\n",
       "      <td>1937</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0852-75409273</td>\n",
       "      <td>private_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6054</td>\n",
       "      <td>RU000A0JPMD2</td>\n",
       "      <td>ПИФАрc6.4</td>\n",
       "      <td>0439-75408664</td>\n",
       "      <td>Арсагера-акции 6.4 ПИФ</td>\n",
       "      <td>RU000A0JPMD2</td>\n",
       "      <td>0</td>\n",
       "      <td>1937</td>\n",
       "      <td>публичное акционерное общество \"Управляющая ко...</td>\n",
       "      <td>7840303927</td>\n",
       "      <td>73405555</td>\n",
       "      <td>0439-75408664</td>\n",
       "      <td>interval_ppif</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>None</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id         secid  shortname      regnumber  \\\n",
       "0  5925  RU000A0JPJ84   ПИФАрсЖД  0852-75409273   \n",
       "1  6054  RU000A0JPMD2  ПИФАрc6.4  0439-75408664   \n",
       "\n",
       "                            name          isin  is_traded  emitent_id  \\\n",
       "0  ПИФ \"Арсагера ЖД\" УК Арсагера  RU000A0JPJ84          0        1937   \n",
       "1         Арсагера-акции 6.4 ПИФ  RU000A0JPMD2          0        1937   \n",
       "\n",
       "                                       emitent_title emitent_inn emitent_okpo  \\\n",
       "0  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "1  публичное акционерное общество \"Управляющая ко...  7840303927     73405555   \n",
       "\n",
       "          gosreg           type       group primary_boardid  \\\n",
       "0  0852-75409273   private_ppif  stock_ppif            TQIF   \n",
       "1  0439-75408664  interval_ppif  stock_ppif            TQIF   \n",
       "\n",
       "  marketprice_boardid  \n",
       "0                None  \n",
       "1                None  "
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "MOEX.request(\n",
    "    5, \n",
    "    q='Арсагера', \n",
    "    start=5\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "id": "268a78ac",
   "metadata": {},
   "outputs": [
    {
     "ename": "KeyError",
     "evalue": "\"Переданы неопределенные для API параметры: {'bad_param': '123'}\"",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyError\u001b[0m                                  Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[198], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mMOEX\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrequest\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m      2\u001b[0m \u001b[43m    \u001b[49m\u001b[38;5;241;43m5\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[0;32m      3\u001b[0m \u001b[43m    \u001b[49m\u001b[43mq\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mАрсагера\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[0;32m      4\u001b[0m \u001b[43m    \u001b[49m\u001b[43mbad_param\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43m123\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\n\u001b[0;32m      5\u001b[0m \u001b[43m)\u001b[49m\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\main.py:359\u001b[0m, in \u001b[0;36mMoexApi.request\u001b[1;34m(self, api_id, only_market_data, blocks, **kwargs)\u001b[0m\n\u001b[0;32m    356\u001b[0m         use_params\u001b[38;5;241m.\u001b[39mupdate(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_block_params(data_entities, blocks))\n\u001b[0;32m    358\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m kwargs:\n\u001b[1;32m--> 359\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mПереданы неопределенные для API параметры: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkwargs\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m    361\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m only_market_data:\n\u001b[0;32m    362\u001b[0m     use_params[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124miss.data\u001b[39m\u001b[38;5;124m\"\u001b[39m] \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mon\u001b[39m\u001b[38;5;124m\"\u001b[39m\n",
      "\u001b[1;31mKeyError\u001b[0m: \"Переданы неопределенные для API параметры: {'bad_param': '123'}\""
     ]
    }
   ],
   "source": [
    "MOEX.request(\n",
    "    5, \n",
    "    q='Арсагера', \n",
    "    bad_param = \"123\"\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "id": "296a800f",
   "metadata": {},
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "Запрос инструментов длиной менее трёх букв игнорируются.",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[200], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mMOEX\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mrequest\u001b[49m\u001b[43m(\u001b[49m\n\u001b[0;32m      2\u001b[0m \u001b[43m    \u001b[49m\u001b[38;5;241;43m5\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[0;32m      3\u001b[0m \u001b[43m    \u001b[49m\u001b[43mq\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mA\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\n\u001b[0;32m      4\u001b[0m \u001b[43m)\u001b[49m\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\main.py:349\u001b[0m, in \u001b[0;36mMoexApi.request\u001b[1;34m(self, api_id, only_market_data, blocks, **kwargs)\u001b[0m\n\u001b[0;32m    347\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_used_api_id\u001b[38;5;241m.\u001b[39mset(\u001b[38;5;28mstr\u001b[39m(api_id))\n\u001b[0;32m    348\u001b[0m url \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_get_full_endpoint(api_dict, kwargs)\n\u001b[1;32m--> 349\u001b[0m use_params \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_get_param_for_endpoint\u001b[49m\u001b[43m(\u001b[49m\u001b[43mapi_dict\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m    351\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m blocks \u001b[38;5;129;01mor\u001b[39;00m kwargs:\n\u001b[0;32m    352\u001b[0m     data_entities \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mset\u001b[39m(api_dict\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mreturn_data\u001b[39m\u001b[38;5;124m\"\u001b[39m, []))\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\main.py:204\u001b[0m, in \u001b[0;36mMoexApi._get_param_for_endpoint\u001b[1;34m(self, api_dict, request_params)\u001b[0m\n\u001b[0;32m    202\u001b[0m         \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28misinstance\u001b[39m(param_value, (\u001b[38;5;28mlist\u001b[39m, \u001b[38;5;28mset\u001b[39m)) \u001b[38;5;129;01mand\u001b[39;00m param \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;129;01min\u001b[39;00m dictionaries\u001b[38;5;241m.\u001b[39mPARAMS_ALLOWED_MANY:\n\u001b[0;32m    203\u001b[0m             \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mПараметр \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mparam\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m не может принимать множественные значения!\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m--> 204\u001b[0m         use_params[param] \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_checker\u001b[49m\u001b[43m(\u001b[49m\u001b[43mparam\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mparam_value\u001b[49m\u001b[43m)\u001b[49m\n\u001b[0;32m    205\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m use_params\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\mixins.py:127\u001b[0m, in \u001b[0;36mMoexParamCheckerMixin._checker\u001b[1;34m(self, key, value, is_params)\u001b[0m\n\u001b[0;32m    125\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m check_func \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[0;32m    126\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mKeyError\u001b[39;00m(\u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mНе найден метод валидации для переданного параметра: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mkey\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m. Проверьте библиотеку.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[1;32m--> 127\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mcheck_func\u001b[49m\u001b[43m(\u001b[49m\u001b[43mvalue\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[1;32mC:\\projects/moex_research\\api_lib\\mixins.py:135\u001b[0m, in \u001b[0;36mMoexParamCheckerMixin._check_instrument_find\u001b[1;34m(q)\u001b[0m\n\u001b[0;32m    133\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m word \u001b[38;5;129;01min\u001b[39;00m q\u001b[38;5;241m.\u001b[39msplit():\n\u001b[0;32m    134\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(word) \u001b[38;5;241m<\u001b[39m \u001b[38;5;241m3\u001b[39m:\n\u001b[1;32m--> 135\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mЗапрос инструментов длиной менее трёх букв игнорируются.\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m    136\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m q\n",
      "\u001b[1;31mValueError\u001b[0m: Запрос инструментов длиной менее трёх букв игнорируются."
     ]
    }
   ],
   "source": [
    "MOEX.request(\n",
    "    5, \n",
    "    q='A', \n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d496e9a3",
   "metadata": {},
   "source": [
    "# На этом ознакомление с библиотекой закончено. Перейдем к изучению поинтов."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "3f23f2b2",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "ec0bf81a",
   "metadata": {},
   "outputs": [],
   "source": [
    "def print_df(result):\n",
    "    if isinstance(result, pd.DataFrame):\n",
    "        display(result[:10])\n",
    "        return\n",
    "    for key, df in result.items():\n",
    "        print(key)\n",
    "        display(df[:10])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "id": "868a9f22",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "13: Получить спецификацию инструмента.\n",
      "Глобальные сущности запроса: ['security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "description: Описание инструментов\n",
      "boards: Режимы, на которых торгуется инструмент\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/13\n",
      "Темплейт: http://iss.moex.com/iss/securities/{security}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "id": "239b11a0",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "description\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>value</th>\n",
       "      <th>type</th>\n",
       "      <th>sort_order</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>precision</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>SECID</td>\n",
       "      <td>Код ценной бумаги</td>\n",
       "      <td>GMKN</td>\n",
       "      <td>string</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NAME</td>\n",
       "      <td>Полное наименование</td>\n",
       "      <td>ГМК \"Нор.Никель\" ПАО ао</td>\n",
       "      <td>string</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>SHORTNAME</td>\n",
       "      <td>Краткое наименование</td>\n",
       "      <td>ГМКНорНик</td>\n",
       "      <td>string</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>ISIN</td>\n",
       "      <td>ISIN код</td>\n",
       "      <td>RU0007288411</td>\n",
       "      <td>string</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>REGNUMBER</td>\n",
       "      <td>Номер государственной регистрации</td>\n",
       "      <td>1-01-40155-F</td>\n",
       "      <td>string</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>ISSUESIZE</td>\n",
       "      <td>Объем выпуска</td>\n",
       "      <td>152863397</td>\n",
       "      <td>number</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>FACEVALUE</td>\n",
       "      <td>Номинальная стоимость</td>\n",
       "      <td>1</td>\n",
       "      <td>number</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>FACEUNIT</td>\n",
       "      <td>Валюта номинала</td>\n",
       "      <td>SUR</td>\n",
       "      <td>string</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>ISSUEDATE</td>\n",
       "      <td>Дата начала торгов</td>\n",
       "      <td>2006-12-26</td>\n",
       "      <td>date</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>LATNAME</td>\n",
       "      <td>Английское наименование</td>\n",
       "      <td>NorNickel GMK</td>\n",
       "      <td>string</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        name                              title                    value  \\\n",
       "0      SECID                  Код ценной бумаги                     GMKN   \n",
       "1       NAME                Полное наименование  ГМК \"Нор.Никель\" ПАО ао   \n",
       "2  SHORTNAME               Краткое наименование                ГМКНорНик   \n",
       "3       ISIN                           ISIN код             RU0007288411   \n",
       "4  REGNUMBER  Номер государственной регистрации             1-01-40155-F   \n",
       "5  ISSUESIZE                      Объем выпуска                152863397   \n",
       "6  FACEVALUE              Номинальная стоимость                        1   \n",
       "7   FACEUNIT                    Валюта номинала                      SUR   \n",
       "8  ISSUEDATE                 Дата начала торгов               2006-12-26   \n",
       "9    LATNAME            Английское наименование            NorNickel GMK   \n",
       "\n",
       "     type  sort_order  is_hidden  precision  \n",
       "0  string           1          0        NaN  \n",
       "1  string           3          0        NaN  \n",
       "2  string           4          0        NaN  \n",
       "3  string           5          0        NaN  \n",
       "4  string           6          0        NaN  \n",
       "5  number           7          0        0.0  \n",
       "6  number           8          0        2.0  \n",
       "7  string           9          0        NaN  \n",
       "8    date          10          0        NaN  \n",
       "9  string          11          1        NaN  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "boards\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>secid</th>\n",
       "      <th>boardid</th>\n",
       "      <th>title</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>market_id</th>\n",
       "      <th>market</th>\n",
       "      <th>engine_id</th>\n",
       "      <th>engine</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>decimals</th>\n",
       "      <th>history_from</th>\n",
       "      <th>history_till</th>\n",
       "      <th>listed_from</th>\n",
       "      <th>listed_till</th>\n",
       "      <th>is_primary</th>\n",
       "      <th>currencyid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>Т+: Акции и ДР - безадрес.</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2014-06-09</td>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>2014-06-09</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>1</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>TQBS</td>\n",
       "      <td>Т+: А2-Акции и паи - безадрес.</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2013-03-25</td>\n",
       "      <td>2014-06-06</td>\n",
       "      <td>2013-03-25</td>\n",
       "      <td>2014-06-06</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>EQBR</td>\n",
       "      <td>Основной режим: А1-Акции и паи - безадрес.</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2010-04-28</td>\n",
       "      <td>2011-08-11</td>\n",
       "      <td>2010-04-28</td>\n",
       "      <td>2011-08-11</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>EQBS</td>\n",
       "      <td>Основной режим: А2-Акции и паи - безадрес.</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2011-08-12</td>\n",
       "      <td>2013-08-30</td>\n",
       "      <td>2011-08-12</td>\n",
       "      <td>2013-08-30</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>EQNL</td>\n",
       "      <td>Основной режим: Б-Акции и паи - безадрес.</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>2006-12-26</td>\n",
       "      <td>2010-04-27</td>\n",
       "      <td>2006-12-26</td>\n",
       "      <td>2010-04-27</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>SPEQ</td>\n",
       "      <td>Поставка по СК (акции)</td>\n",
       "      <td>125</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2018-06-29</td>\n",
       "      <td>2023-03-17</td>\n",
       "      <td>2018-06-29</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>TQDP</td>\n",
       "      <td>Крупные пакеты - Акции - безадрес.</td>\n",
       "      <td>42</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>2019-03-04</td>\n",
       "      <td>2023-02-15</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>EQDP</td>\n",
       "      <td>Крупные пакеты - Акции - безадрес.</td>\n",
       "      <td>42</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2011-12-12</td>\n",
       "      <td>2019-03-01</td>\n",
       "      <td>2011-12-12</td>\n",
       "      <td>2019-03-01</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>RPMO</td>\n",
       "      <td>РЕПО-М - адрес.</td>\n",
       "      <td>201</td>\n",
       "      <td>3</td>\n",
       "      <td>repo</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2019-04-22</td>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>2019-04-22</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>GMKN</td>\n",
       "      <td>PTEQ</td>\n",
       "      <td>РПС с ЦК: Акции и ДР - адрес.</td>\n",
       "      <td>59</td>\n",
       "      <td>4</td>\n",
       "      <td>ndm</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2014-06-09</td>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>2014-06-09</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>0</td>\n",
       "      <td>RUB</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  secid boardid                                       title  board_group_id  \\\n",
       "0  GMKN    TQBR                  Т+: Акции и ДР - безадрес.              57   \n",
       "1  GMKN    TQBS              Т+: А2-Акции и паи - безадрес.              57   \n",
       "2  GMKN    EQBR  Основной режим: А1-Акции и паи - безадрес.               6   \n",
       "3  GMKN    EQBS  Основной режим: А2-Акции и паи - безадрес.               6   \n",
       "4  GMKN    EQNL   Основной режим: Б-Акции и паи - безадрес.               6   \n",
       "5  GMKN    SPEQ                      Поставка по СК (акции)             125   \n",
       "6  GMKN    TQDP          Крупные пакеты - Акции - безадрес.              42   \n",
       "7  GMKN    EQDP          Крупные пакеты - Акции - безадрес.              42   \n",
       "8  GMKN    RPMO                             РЕПО-М - адрес.             201   \n",
       "9  GMKN    PTEQ               РПС с ЦК: Акции и ДР - адрес.              59   \n",
       "\n",
       "   market_id  market  engine_id engine  is_traded  decimals history_from  \\\n",
       "0          1  shares          1  stock          1         0   2014-06-09   \n",
       "1          1  shares          1  stock          0         0   2013-03-25   \n",
       "2          1  shares          1  stock          0         0   2010-04-28   \n",
       "3          1  shares          1  stock          0         0   2011-08-12   \n",
       "4          1  shares          1  stock          0         2   2006-12-26   \n",
       "5          1  shares          1  stock          1         2   2018-06-29   \n",
       "6          1  shares          1  stock          0         0         None   \n",
       "7          1  shares          1  stock          0         0   2011-12-12   \n",
       "8          3    repo          1  stock          1         4   2019-04-22   \n",
       "9          4     ndm          1  stock          1         0   2014-06-09   \n",
       "\n",
       "  history_till listed_from listed_till  is_primary currencyid  \n",
       "0   2023-05-31  2014-06-09  2023-06-01           1        RUB  \n",
       "1   2014-06-06  2013-03-25  2014-06-06           0        RUB  \n",
       "2   2011-08-11  2010-04-28  2011-08-11           0        RUB  \n",
       "3   2013-08-30  2011-08-12  2013-08-30           0        RUB  \n",
       "4   2010-04-27  2006-12-26  2010-04-27           0        RUB  \n",
       "5   2023-03-17  2018-06-29  2023-06-01           0        RUB  \n",
       "6         None  2019-03-04  2023-02-15           0        RUB  \n",
       "7   2019-03-01  2011-12-12  2019-03-01           0        RUB  \n",
       "8   2023-05-31  2019-04-22  2023-06-01           0        RUB  \n",
       "9   2023-05-31  2014-06-09  2023-06-01           0        RUB  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(13, security=\"GMKN\")\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "id": "11cd62a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>value</th>\n",
       "      <th>type</th>\n",
       "      <th>sort_order</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>precision</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>SECID</td>\n",
       "      <td>Код ценной бумаги</td>\n",
       "      <td>GMKN</td>\n",
       "      <td>string</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NAME</td>\n",
       "      <td>Полное наименование</td>\n",
       "      <td>ГМК \"Нор.Никель\" ПАО ао</td>\n",
       "      <td>string</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>SHORTNAME</td>\n",
       "      <td>Краткое наименование</td>\n",
       "      <td>ГМКНорНик</td>\n",
       "      <td>string</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>ISIN</td>\n",
       "      <td>ISIN код</td>\n",
       "      <td>RU0007288411</td>\n",
       "      <td>string</td>\n",
       "      <td>5</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>REGNUMBER</td>\n",
       "      <td>Номер государственной регистрации</td>\n",
       "      <td>1-01-40155-F</td>\n",
       "      <td>string</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>ISSUESIZE</td>\n",
       "      <td>Объем выпуска</td>\n",
       "      <td>152863397</td>\n",
       "      <td>number</td>\n",
       "      <td>7</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>FACEVALUE</td>\n",
       "      <td>Номинальная стоимость</td>\n",
       "      <td>1</td>\n",
       "      <td>number</td>\n",
       "      <td>8</td>\n",
       "      <td>0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>FACEUNIT</td>\n",
       "      <td>Валюта номинала</td>\n",
       "      <td>SUR</td>\n",
       "      <td>string</td>\n",
       "      <td>9</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>ISSUEDATE</td>\n",
       "      <td>Дата начала торгов</td>\n",
       "      <td>2006-12-26</td>\n",
       "      <td>date</td>\n",
       "      <td>10</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>LATNAME</td>\n",
       "      <td>Английское наименование</td>\n",
       "      <td>NorNickel GMK</td>\n",
       "      <td>string</td>\n",
       "      <td>11</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        name                              title                    value  \\\n",
       "0      SECID                  Код ценной бумаги                     GMKN   \n",
       "1       NAME                Полное наименование  ГМК \"Нор.Никель\" ПАО ао   \n",
       "2  SHORTNAME               Краткое наименование                ГМКНорНик   \n",
       "3       ISIN                           ISIN код             RU0007288411   \n",
       "4  REGNUMBER  Номер государственной регистрации             1-01-40155-F   \n",
       "5  ISSUESIZE                      Объем выпуска                152863397   \n",
       "6  FACEVALUE              Номинальная стоимость                        1   \n",
       "7   FACEUNIT                    Валюта номинала                      SUR   \n",
       "8  ISSUEDATE                 Дата начала торгов               2006-12-26   \n",
       "9    LATNAME            Английское наименование            NorNickel GMK   \n",
       "\n",
       "     type  sort_order  is_hidden  precision  \n",
       "0  string           1          0        NaN  \n",
       "1  string           3          0        NaN  \n",
       "2  string           4          0        NaN  \n",
       "3  string           5          0        NaN  \n",
       "4  string           6          0        NaN  \n",
       "5  number           7          0        0.0  \n",
       "6  number           8          0        2.0  \n",
       "7  string           9          0        NaN  \n",
       "8    date          10          0        NaN  \n",
       "9  string          11          1        NaN  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(13, security=\"GMKN\", blocks=[\"description\"])\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "cd1889da",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(13)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "id": "dbce7058",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "24: Получить сводные обороты по рынкам\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "turnovers: Обороты рынков\n",
      "turnoversprevdate: Обороты рынков за предыдущий торговый день\n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Значение по умолчанию: today\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/24\n",
      "Темплейт: http://iss.moex.com/iss/turnovers\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "id": "a21e53bb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "turnovers\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>VALTODAY</th>\n",
       "      <th>NUMTRADES</th>\n",
       "      <th>TITLE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>stock</td>\n",
       "      <td>2.825577e+06</td>\n",
       "      <td>3198312.0</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>currency</td>\n",
       "      <td>1.012673e+06</td>\n",
       "      <td>279200.0</td>\n",
       "      <td>Валютный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>futures</td>\n",
       "      <td>3.010214e+05</td>\n",
       "      <td>1264329.0</td>\n",
       "      <td>Срочный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>commodity</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Товарный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>agro</td>\n",
       "      <td>2.533306e+02</td>\n",
       "      <td>28.0</td>\n",
       "      <td>Агро</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>otc</td>\n",
       "      <td>4.385368e+03</td>\n",
       "      <td>200.0</td>\n",
       "      <td>ОТС с ЦК</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>TOTALS</td>\n",
       "      <td>4.143910e+06</td>\n",
       "      <td>4742069.0</td>\n",
       "      <td>Всего по Московской Бирже</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        NAME      VALTODAY  NUMTRADES                             TITLE\n",
       "0      stock  2.825577e+06  3198312.0  Фондовый рынок и рынок депозитов\n",
       "1   currency  1.012673e+06   279200.0                    Валютный рынок\n",
       "2    futures  3.010214e+05  1264329.0                     Срочный рынок\n",
       "3  commodity           NaN        NaN                    Товарный рынок\n",
       "4       agro  2.533306e+02       28.0                              Агро\n",
       "5        otc  4.385368e+03      200.0                          ОТС с ЦК\n",
       "6     TOTALS  4.143910e+06  4742069.0         Всего по Московской Бирже"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "turnoversprevdate\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>NAME</th>\n",
       "      <th>VALTODAY_USD</th>\n",
       "      <th>NUMTRADES</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>stock</td>\n",
       "      <td>35473.896838</td>\n",
       "      <td>3988636.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>currency</td>\n",
       "      <td>13362.898572</td>\n",
       "      <td>295446.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>futures</td>\n",
       "      <td>3587.763843</td>\n",
       "      <td>1294999.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>commodity</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>agro</td>\n",
       "      <td>5.015068</td>\n",
       "      <td>39.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>otc</td>\n",
       "      <td>26.141840</td>\n",
       "      <td>253.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>TOTALS</td>\n",
       "      <td>52455.716161</td>\n",
       "      <td>5579373.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        NAME  VALTODAY_USD  NUMTRADES\n",
       "0      stock  35473.896838  3988636.0\n",
       "1   currency  13362.898572   295446.0\n",
       "2    futures   3587.763843  1294999.0\n",
       "3  commodity           NaN        NaN\n",
       "4       agro      5.015068       39.0\n",
       "5        otc     26.141840      253.0\n",
       "6     TOTALS  52455.716161  5579373.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(24, date=\"2023-05-31\", \n",
    "                      COLUMNS_turnovers=[\"NAME\", \"VALTODAY\", \"NUMTRADES\", \"TITLE\"],\n",
    "                      COLUMNS_turnoversprevdate=[\"NAME\", \"VALTODAY_USD\", \"NUMTRADES\"])\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "21153bb1",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(24)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "id": "75eb2d86",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "26: Получить интервал дат, доступных в истории для рынка по заданному режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "dates: Интервал дат, доступных в истории.\n",
      "\n",
      "Параметры запроса:\n",
      "``interim``: Показать интервал дат промежуточных итогов торгов (только для валютного рынка). Значение по умолчанию: 0\n",
      "``tradingsession``: Показать данные только за необходимую сессию (только для фондового рынка)\n",
      "  0 - Утренняя\n",
      "  1 - Основная\n",
      "  2 - Вечерняя\n",
      "  3 - Итого. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/26\n",
      "Темплейт: http://iss.moex.com/iss/history/engines/{engine}/markets/{market}/boards/{board}/dates\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "b205708f",
   "metadata": {},
   "outputs": [],
   "source": [
    "reload_moex()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "1b618300",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-12-06</td>\n",
       "      <td>2022-02-24</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         from        till\n",
       "0  2021-12-06  2022-02-24"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(26, engine=\"stock\", market=\"shares\", board=\"TQBR\", tradingsession=0)\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "343ea84d",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(26)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "00dd3031",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "28: Получить глобальные справочники ISS.\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "engines: Список доступных торговых систем\n",
      "markets: Справочник доступных рынков и их атрибуты.\n",
      "Описание дополнительных полей:\n",
      "  - is_otc - Внебиржевой рынок.\n",
      "  - has_history_files - Формируются файлы с итогами торгов.\n",
      "  - has_history_trades_files - Формируются файлы с реестрами сделок.\n",
      "  - has_trades - Есть сделки внутри дня.\n",
      "  - has_history - Есть итоги торгов.\n",
      "  - has_candles - Для рынка есть свечки.\n",
      "  - has_orderbook - Есть стаканы заявок.\n",
      "  - has_tradingsession - Наличие дополнительных сессий у рынка.\n",
      "  - has_extra_yields - Для рынка рассчитываются дополнительные доходности.\n",
      "  - has_delay - Для рынка не предусмотрена задержка данных.\n",
      "boards: Справочник режимов торгов \n",
      "boardgroups: Справочник групп режимов торгов.\n",
      "Расшифровка поля - \"category\" -> https://iss.moex.com/iss/index/handbooks/boardgroups_category.xml\n",
      "durations: Справочник доступных расчетных интервалов свечей в формате HLOCV\n",
      "securitytypes: \n",
      "securitygroups: \n",
      "securitycollections: \n",
      "\n",
      "Параметры запроса:\n",
      "``engine``: \n",
      "``is_traded``: Показывать торгуемые только торгующиеся в настоящий момент группы режимов торгов:\n",
      "is_traded=1. Значение по умолчанию: 0\n",
      "``hide_inactive``: Значение по умолчанию: 0\n",
      "``securitygroups``: \n",
      "``trade_engine``: \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/28\n",
      "Темплейт: http://iss.moex.com/iss/index\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "ded5826b",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "engines\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>state</td>\n",
       "      <td>Рынок ГЦБ (размещение)</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>currency</td>\n",
       "      <td>Валютный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>futures</td>\n",
       "      <td>Срочный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>commodity</td>\n",
       "      <td>Товарный рынок</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6</td>\n",
       "      <td>interventions</td>\n",
       "      <td>Товарные интервенции</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7</td>\n",
       "      <td>offboard</td>\n",
       "      <td>ОТС-система</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>9</td>\n",
       "      <td>agro</td>\n",
       "      <td>Агро</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1012</td>\n",
       "      <td>otc</td>\n",
       "      <td>ОТС с ЦК</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id           name                             title\n",
       "0     1          stock  Фондовый рынок и рынок депозитов\n",
       "1     2          state            Рынок ГЦБ (размещение)\n",
       "2     3       currency                    Валютный рынок\n",
       "3     4        futures                     Срочный рынок\n",
       "4     5      commodity                    Товарный рынок\n",
       "5     6  interventions              Товарные интервенции\n",
       "6     7       offboard                       ОТС-система\n",
       "7     9           agro                              Агро\n",
       "8  1012            otc                          ОТС с ЦК"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "markets\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>market_name</th>\n",
       "      <th>market_title</th>\n",
       "      <th>market_id</th>\n",
       "      <th>marketplace</th>\n",
       "      <th>is_otc</th>\n",
       "      <th>has_history_files</th>\n",
       "      <th>has_history_trades_files</th>\n",
       "      <th>has_trades</th>\n",
       "      <th>has_history</th>\n",
       "      <th>has_candles</th>\n",
       "      <th>has_orderbook</th>\n",
       "      <th>has_tradingsession</th>\n",
       "      <th>has_extra_yields</th>\n",
       "      <th>has_delay</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>index</td>\n",
       "      <td>Индексы фондового рынка</td>\n",
       "      <td>5</td>\n",
       "      <td>INDICES</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>shares</td>\n",
       "      <td>Рынок акций</td>\n",
       "      <td>1</td>\n",
       "      <td>MXSE</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>bonds</td>\n",
       "      <td>Рынок облигаций</td>\n",
       "      <td>2</td>\n",
       "      <td>MXSE</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>ndm</td>\n",
       "      <td>Режим переговорных сделок</td>\n",
       "      <td>4</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>29</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>otc</td>\n",
       "      <td>ОТС</td>\n",
       "      <td>29</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>ccp</td>\n",
       "      <td>РЕПО с ЦК</td>\n",
       "      <td>27</td>\n",
       "      <td>MXSE</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>35</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>deposit</td>\n",
       "      <td>Депозиты с ЦК</td>\n",
       "      <td>35</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>repo</td>\n",
       "      <td>Рынок сделок РЕПО</td>\n",
       "      <td>3</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>28</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>qnv</td>\n",
       "      <td>Квал. инвесторы</td>\n",
       "      <td>28</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>36</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>mamc</td>\n",
       "      <td>Мультивалютный рынок смешанных активов</td>\n",
       "      <td>36</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  trade_engine_id trade_engine_name                trade_engine_title  \\\n",
       "0   5                1             stock  Фондовый рынок и рынок депозитов   \n",
       "1   1                1             stock  Фондовый рынок и рынок депозитов   \n",
       "2   2                1             stock  Фондовый рынок и рынок депозитов   \n",
       "3   4                1             stock  Фондовый рынок и рынок депозитов   \n",
       "4  29                1             stock  Фондовый рынок и рынок депозитов   \n",
       "5  27                1             stock  Фондовый рынок и рынок депозитов   \n",
       "6  35                1             stock  Фондовый рынок и рынок депозитов   \n",
       "7   3                1             stock  Фондовый рынок и рынок депозитов   \n",
       "8  28                1             stock  Фондовый рынок и рынок депозитов   \n",
       "9  36                1             stock  Фондовый рынок и рынок депозитов   \n",
       "\n",
       "  market_name                            market_title  market_id marketplace  \\\n",
       "0       index                 Индексы фондового рынка          5     INDICES   \n",
       "1      shares                             Рынок акций          1        MXSE   \n",
       "2       bonds                         Рынок облигаций          2        MXSE   \n",
       "3         ndm               Режим переговорных сделок          4        None   \n",
       "4         otc                                     ОТС         29        None   \n",
       "5         ccp                               РЕПО с ЦК         27        MXSE   \n",
       "6     deposit                           Депозиты с ЦК         35        None   \n",
       "7        repo                       Рынок сделок РЕПО          3        None   \n",
       "8         qnv                         Квал. инвесторы         28        None   \n",
       "9        mamc  Мультивалютный рынок смешанных активов         36        None   \n",
       "\n",
       "   is_otc  has_history_files  has_history_trades_files  has_trades  \\\n",
       "0       0                1.0                       0.0         1.0   \n",
       "1       0                1.0                       1.0         1.0   \n",
       "2       0                1.0                       1.0         1.0   \n",
       "3       0                1.0                       1.0         1.0   \n",
       "4       0                0.0                       0.0         0.0   \n",
       "5       0                1.0                       1.0         1.0   \n",
       "6       0                1.0                       0.0         0.0   \n",
       "7       0                1.0                       1.0         1.0   \n",
       "8       0                1.0                       1.0         1.0   \n",
       "9       0                1.0                       1.0         1.0   \n",
       "\n",
       "   has_history  has_candles  has_orderbook  has_tradingsession  \\\n",
       "0          1.0            1            0.0                   1   \n",
       "1          1.0            1            1.0                   1   \n",
       "2          1.0            1            1.0                   1   \n",
       "3          1.0            0            0.0                   1   \n",
       "4          1.0            0            0.0                   0   \n",
       "5          1.0            1            1.0                   1   \n",
       "6          1.0            0            0.0                   0   \n",
       "7          1.0            0            0.0                   1   \n",
       "8          1.0            1            0.0                   0   \n",
       "9          1.0            0            0.0                   1   \n",
       "\n",
       "   has_extra_yields  has_delay  \n",
       "0                 0          0  \n",
       "1                 0          1  \n",
       "2                 1          1  \n",
       "3                 1          1  \n",
       "4                 0          0  \n",
       "5                 0          1  \n",
       "6                 0          0  \n",
       "7                 0          1  \n",
       "8                 0          1  \n",
       "9                 0          1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "boards\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>engine_id</th>\n",
       "      <th>market_id</th>\n",
       "      <th>boardid</th>\n",
       "      <th>board_title</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>has_candles</th>\n",
       "      <th>is_primary</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>177</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQIF</td>\n",
       "      <td>Т+: Паи - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>178</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQTF</td>\n",
       "      <td>Т+: ETF - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>129</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>Т+: Акции и ДР - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>130</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQBS</td>\n",
       "      <td>Т+: А2-Акции и паи - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>131</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQNL</td>\n",
       "      <td>Т+: Б-Акции и паи - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>132</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQLV</td>\n",
       "      <td>Т+: В-Акции и ДР - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>133</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQLI</td>\n",
       "      <td>Т+: И-Акции - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>134</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQNE</td>\n",
       "      <td>Т+: Акции, паи и ДР внесписочные - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>158</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQDE</td>\n",
       "      <td>Т+: Акции Д - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>401</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>TQPI</td>\n",
       "      <td>Т+: Акции ПИР - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id  board_group_id  engine_id  market_id boardid  \\\n",
       "0  177              57          1          1    TQIF   \n",
       "1  178              57          1          1    TQTF   \n",
       "2  129              57          1          1    TQBR   \n",
       "3  130              57          1          1    TQBS   \n",
       "4  131              57          1          1    TQNL   \n",
       "5  132              57          1          1    TQLV   \n",
       "6  133              57          1          1    TQLI   \n",
       "7  134              57          1          1    TQNE   \n",
       "8  158              57          1          1    TQDE   \n",
       "9  401              57          1          1    TQPI   \n",
       "\n",
       "                                    board_title  is_traded  has_candles  \\\n",
       "0                           Т+: Паи - безадрес.          1            1   \n",
       "1                           Т+: ETF - безадрес.          1            1   \n",
       "2                    Т+: Акции и ДР - безадрес.          1            1   \n",
       "3                Т+: А2-Акции и паи - безадрес.          0            1   \n",
       "4                 Т+: Б-Акции и паи - безадрес.          0            1   \n",
       "5                  Т+: В-Акции и ДР - безадрес.          0            1   \n",
       "6                       Т+: И-Акции - безадрес.          0            1   \n",
       "7  Т+: Акции, паи и ДР внесписочные - безадрес.          0            1   \n",
       "8                       Т+: Акции Д - безадрес.          0            1   \n",
       "9                     Т+: Акции ПИР - безадрес.          1            1   \n",
       "\n",
       "   is_primary  \n",
       "0           1  \n",
       "1           1  \n",
       "2           1  \n",
       "3           1  \n",
       "4           1  \n",
       "5           1  \n",
       "6           1  \n",
       "7           1  \n",
       "8           1  \n",
       "9           1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "boardgroups\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>market_id</th>\n",
       "      <th>market_name</th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>is_default</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>is_traded</th>\n",
       "      <th>is_order_driven</th>\n",
       "      <th>category</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index</td>\n",
       "      <td>Индексы</td>\n",
       "      <td>1</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index_inav</td>\n",
       "      <td>INAV</td>\n",
       "      <td>0</td>\n",
       "      <td>104</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index_mmix</td>\n",
       "      <td>Money Market IndeX</td>\n",
       "      <td>0</td>\n",
       "      <td>155</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1028</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index_namex</td>\n",
       "      <td>Индексы НТБ</td>\n",
       "      <td>0</td>\n",
       "      <td>1028</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1153</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index_pf</td>\n",
       "      <td>Ценовой фиксинг</td>\n",
       "      <td>0</td>\n",
       "      <td>1153</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>287</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>5</td>\n",
       "      <td>index</td>\n",
       "      <td>stock_index_sdfi</td>\n",
       "      <td>Индексы СПФИ</td>\n",
       "      <td>0</td>\n",
       "      <td>287</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>stock_shares_tplus</td>\n",
       "      <td>Т+: Основной режим - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>57</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>156</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>stock_shares_tplus_usd</td>\n",
       "      <td>Т+: Основной режим (USD) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>156</td>\n",
       "      <td>1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>Т0: Основной режим - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>125</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>1</td>\n",
       "      <td>shares</td>\n",
       "      <td>stock_shares_settle</td>\n",
       "      <td>Поставка по СК</td>\n",
       "      <td>0</td>\n",
       "      <td>125</td>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>main</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id  trade_engine_id trade_engine_name                trade_engine_title  \\\n",
       "0     9                1             stock  Фондовый рынок и рынок депозитов   \n",
       "1   104                1             stock  Фондовый рынок и рынок депозитов   \n",
       "2   155                1             stock  Фондовый рынок и рынок депозитов   \n",
       "3  1028                1             stock  Фондовый рынок и рынок депозитов   \n",
       "4  1153                1             stock  Фондовый рынок и рынок депозитов   \n",
       "5   287                1             stock  Фондовый рынок и рынок депозитов   \n",
       "6    57                1             stock  Фондовый рынок и рынок депозитов   \n",
       "7   156                1             stock  Фондовый рынок и рынок депозитов   \n",
       "8     6                1             stock  Фондовый рынок и рынок депозитов   \n",
       "9   125                1             stock  Фондовый рынок и рынок депозитов   \n",
       "\n",
       "   market_id market_name                    name  \\\n",
       "0          5       index             stock_index   \n",
       "1          5       index        stock_index_inav   \n",
       "2          5       index        stock_index_mmix   \n",
       "3          5       index       stock_index_namex   \n",
       "4          5       index          stock_index_pf   \n",
       "5          5       index        stock_index_sdfi   \n",
       "6          1      shares      stock_shares_tplus   \n",
       "7          1      shares  stock_shares_tplus_usd   \n",
       "8          1      shares            stock_shares   \n",
       "9          1      shares     stock_shares_settle   \n",
       "\n",
       "                                  title  is_default  board_group_id  \\\n",
       "0                               Индексы           1               9   \n",
       "1                                  INAV           0             104   \n",
       "2                    Money Market IndeX           0             155   \n",
       "3                           Индексы НТБ           0            1028   \n",
       "4                       Ценовой фиксинг           0            1153   \n",
       "5                          Индексы СПФИ           0             287   \n",
       "6        Т+: Основной режим - безадрес.           1              57   \n",
       "7  Т+: Основной режим (USD) - безадрес.           0             156   \n",
       "8        Т0: Основной режим - безадрес.           0               6   \n",
       "9                        Поставка по СК           0             125   \n",
       "\n",
       "   is_traded  is_order_driven category  \n",
       "0          1              NaN     main  \n",
       "1          1              NaN     main  \n",
       "2          1              NaN     main  \n",
       "3          1              NaN     main  \n",
       "4          1              NaN     main  \n",
       "5          1              NaN     main  \n",
       "6          1              1.0     main  \n",
       "7          1              1.0     main  \n",
       "8          0              1.0     main  \n",
       "9          1              NaN     main  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "durations\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>interval</th>\n",
       "      <th>duration</th>\n",
       "      <th>days</th>\n",
       "      <th>title</th>\n",
       "      <th>hint</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>60</td>\n",
       "      <td>None</td>\n",
       "      <td>минута</td>\n",
       "      <td>1м</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>10</td>\n",
       "      <td>600</td>\n",
       "      <td>None</td>\n",
       "      <td>10 минут</td>\n",
       "      <td>10м</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>60</td>\n",
       "      <td>3600</td>\n",
       "      <td>None</td>\n",
       "      <td>час</td>\n",
       "      <td>1ч</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>24</td>\n",
       "      <td>86400</td>\n",
       "      <td>None</td>\n",
       "      <td>день</td>\n",
       "      <td>1д</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7</td>\n",
       "      <td>604800</td>\n",
       "      <td>None</td>\n",
       "      <td>неделя</td>\n",
       "      <td>1н</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>31</td>\n",
       "      <td>2678400</td>\n",
       "      <td>None</td>\n",
       "      <td>месяц</td>\n",
       "      <td>1М</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>4</td>\n",
       "      <td>8035200</td>\n",
       "      <td>None</td>\n",
       "      <td>квартал</td>\n",
       "      <td>1К</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   interval  duration  days     title hint\n",
       "0         1        60  None    минута   1м\n",
       "1        10       600  None  10 минут  10м\n",
       "2        60      3600  None       час   1ч\n",
       "3        24     86400  None      день   1д\n",
       "4         7    604800  None    неделя   1н\n",
       "5        31   2678400  None     месяц   1М\n",
       "6         4   8035200  None   квартал   1К"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securitytypes\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>trade_engine_id</th>\n",
       "      <th>trade_engine_name</th>\n",
       "      <th>trade_engine_title</th>\n",
       "      <th>security_type_name</th>\n",
       "      <th>security_type_title</th>\n",
       "      <th>security_group_name</th>\n",
       "      <th>stock_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>common_share</td>\n",
       "      <td>Акция обыкновенная</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>preferred_share</td>\n",
       "      <td>Акция привилегированная</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>51</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>depositary_receipt</td>\n",
       "      <td>Депозитарная расписка</td>\n",
       "      <td>stock_dr</td>\n",
       "      <td>D</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>54</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>ofz_bond</td>\n",
       "      <td>Государственная облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>cb_bond</td>\n",
       "      <td>Облигация центрального банка</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>41</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>subfederal_bond</td>\n",
       "      <td>Региональная облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>45</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>municipal_bond</td>\n",
       "      <td>Муниципальная облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>C</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>corporate_bond</td>\n",
       "      <td>Корпоративная облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>43</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>exchange_bond</td>\n",
       "      <td>Биржевая облигация</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>42</td>\n",
       "      <td>1</td>\n",
       "      <td>stock</td>\n",
       "      <td>Фондовый рынок и рынок депозитов</td>\n",
       "      <td>ifi_bond</td>\n",
       "      <td>Облигация МФО</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id  trade_engine_id trade_engine_name                trade_engine_title  \\\n",
       "0   3                1             stock  Фондовый рынок и рынок депозитов   \n",
       "1   1                1             stock  Фондовый рынок и рынок депозитов   \n",
       "2  51                1             stock  Фондовый рынок и рынок депозитов   \n",
       "3  54                1             stock  Фондовый рынок и рынок депозитов   \n",
       "4   4                1             stock  Фондовый рынок и рынок депозитов   \n",
       "5  41                1             stock  Фондовый рынок и рынок депозитов   \n",
       "6  45                1             stock  Фондовый рынок и рынок депозитов   \n",
       "7   2                1             stock  Фондовый рынок и рынок депозитов   \n",
       "8  43                1             stock  Фондовый рынок и рынок депозитов   \n",
       "9  42                1             stock  Фондовый рынок и рынок депозитов   \n",
       "\n",
       "   security_type_name           security_type_title security_group_name  \\\n",
       "0        common_share            Акция обыкновенная        stock_shares   \n",
       "1     preferred_share      Акция привилегированная         stock_shares   \n",
       "2  depositary_receipt         Депозитарная расписка            stock_dr   \n",
       "3            ofz_bond     Государственная облигация         stock_bonds   \n",
       "4             cb_bond  Облигация центрального банка         stock_bonds   \n",
       "5     subfederal_bond        Региональная облигация         stock_bonds   \n",
       "6      municipal_bond       Муниципальная облигация         stock_bonds   \n",
       "7      corporate_bond       Корпоративная облигация         stock_bonds   \n",
       "8       exchange_bond            Биржевая облигация         stock_bonds   \n",
       "9            ifi_bond                 Облигация МФО         stock_bonds   \n",
       "\n",
       "  stock_type  \n",
       "0          1  \n",
       "1          2  \n",
       "2          D  \n",
       "3          3  \n",
       "4          5  \n",
       "5          4  \n",
       "6          C  \n",
       "7          6  \n",
       "8          8  \n",
       "9          7  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securitygroups\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>is_hidden</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>12</td>\n",
       "      <td>stock_index</td>\n",
       "      <td>Индексы</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4</td>\n",
       "      <td>stock_shares</td>\n",
       "      <td>Акции</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>Облигации</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>9</td>\n",
       "      <td>currency_selt</td>\n",
       "      <td>Валюта</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>10</td>\n",
       "      <td>futures_forts</td>\n",
       "      <td>Фьючерсы</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>26</td>\n",
       "      <td>futures_options</td>\n",
       "      <td>Опционы</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>18</td>\n",
       "      <td>stock_dr</td>\n",
       "      <td>Депозитарные расписки</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>33</td>\n",
       "      <td>stock_foreign_shares</td>\n",
       "      <td>Иностранные ц.б.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6</td>\n",
       "      <td>stock_eurobond</td>\n",
       "      <td>Еврооблигации</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>5</td>\n",
       "      <td>stock_ppif</td>\n",
       "      <td>Паи ПИФов</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id                  name                  title  is_hidden\n",
       "0  12           stock_index                Индексы          0\n",
       "1   4          stock_shares                  Акции          0\n",
       "2   3           stock_bonds              Облигации          0\n",
       "3   9         currency_selt                 Валюта          0\n",
       "4  10         futures_forts               Фьючерсы          0\n",
       "5  26       futures_options                Опционы          0\n",
       "6  18              stock_dr  Депозитарные расписки          0\n",
       "7  33  stock_foreign_shares       Иностранные ц.б.          0\n",
       "8   6        stock_eurobond          Еврооблигации          0\n",
       "9   5            stock_ppif              Паи ПИФов          0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securitycollections\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>security_group_id</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>72</td>\n",
       "      <td>stock_index_all</td>\n",
       "      <td>Все индексы</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>213</td>\n",
       "      <td>stock_index_shares</td>\n",
       "      <td>Основные индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>210</td>\n",
       "      <td>stock_index_shares_sectoral</td>\n",
       "      <td>Отраслевые индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>249</td>\n",
       "      <td>stock_index_total_return</td>\n",
       "      <td>Индексы акций полной доходности</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>211</td>\n",
       "      <td>stock_index_shares_thematic</td>\n",
       "      <td>Тематические индексы акций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>207</td>\n",
       "      <td>stock_index_bonds</td>\n",
       "      <td>Основные индексы облигаций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>214</td>\n",
       "      <td>stock_index_bonds_state</td>\n",
       "      <td>Индексы государственных облигаций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>208</td>\n",
       "      <td>stock_index_bonds_corporate</td>\n",
       "      <td>Индексы корпоративных облигаций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>212</td>\n",
       "      <td>stock_index_bonds_municipal</td>\n",
       "      <td>Индексы муниципальных облигаций</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>209</td>\n",
       "      <td>stock_index_bonds_retiring</td>\n",
       "      <td>Индексы активов пенсионных накоплений</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id                         name                                  title  \\\n",
       "0   72              stock_index_all                            Все индексы   \n",
       "1  213           stock_index_shares                 Основные индексы акций   \n",
       "2  210  stock_index_shares_sectoral               Отраслевые индексы акций   \n",
       "3  249     stock_index_total_return        Индексы акций полной доходности   \n",
       "4  211  stock_index_shares_thematic             Тематические индексы акций   \n",
       "5  207            stock_index_bonds             Основные индексы облигаций   \n",
       "6  214      stock_index_bonds_state      Индексы государственных облигаций   \n",
       "7  208  stock_index_bonds_corporate        Индексы корпоративных облигаций   \n",
       "8  212  stock_index_bonds_municipal        Индексы муниципальных облигаций   \n",
       "9  209   stock_index_bonds_retiring  Индексы активов пенсионных накоплений   \n",
       "\n",
       "   security_group_id  \n",
       "0                 12  \n",
       "1                 12  \n",
       "2                 12  \n",
       "3                 12  \n",
       "4                 12  \n",
       "5                 12  \n",
       "6                 12  \n",
       "7                 12  \n",
       "8                 12  \n",
       "9                 12  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Данные уже в справочнике объекта MOEX. В детали лезть нет смысла\n",
    "result = MOEX.request(28)\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "772a68b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(28)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "8463935f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "32: Получить таблицу инструментов по режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Справочник полей таблицы со статическими данными торговой сессии рынка\n",
      "marketdata: Данные с текущими значениями инструментов рынка\n",
      "dataversion: Версионность данных.\n",
      "marketdata_yields: Доходности\n",
      "\n",
      "Параметры запроса:\n",
      "``primary_board``: Показывать инструменты - только для главного режима торгов по бумаге.\n",
      "Фильтр работает только для фондового (stock) и валютного (currency) рынка.\n",
      "Будьте осторожны используя данный фильтр за пределами основных режимов торгов.\n",
      "Список главных режимов торгов: https://iss.moex.com/iss/securities/ колонка \"primary_boardid\".. \n",
      "``assets``: Фильтр по коду базового актива (только для срочного рынка). Колонка ASSETCODE.\n",
      "Пример: https://iss.moex.com/iss/engines/futures/markets/forts/securities?assets=EURRUBTOM,AFLT\n",
      "Ограничения: не более 5 типов бумаг.. \n",
      "``index``: Выводить акции из базы индекса.\n",
      "Только для фондового рынка.. \n",
      "``security_collection``: Фильтр по коллекции. \n",
      "``previous_session``: Данные предыдущей сессии для forts и options рынков  . Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH (не более 10 инструментов).. \n",
      "``first``: Отдать n первых строк. Значение по умолчанию: 0\n",
      "``sort_column``: \n",
      "``sort_order``: Значение по умолчанию: asc\n",
      "``leaders``: Лидеры торгов (только для futures/options). Значение по умолчанию: 0\n",
      "``nearest``: Выводить фьючерсы с ближайшей датой погашения. Значение по умолчанию: 0\n",
      "``sectypes``: Фильтр по типу инструмента (только для срочного и фондового рынков).\n",
      "Например:\n",
      "  - https://iss.moex.com/iss/engines/futures/markets/forts/securities?sectypes=ri,gz\n",
      "  - https://iss.moex.com/iss/engines/stock/markets/bonds/securities?sectypes=8\n",
      "Ограничения: не более 5 типов бумаг.\n",
      "!! Для срочного рынка устарело. Используйте фильтр \"assets\".. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/32\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "f641ff4e",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securities\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SECID</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>SHORTNAME</th>\n",
       "      <th>SECNAME</th>\n",
       "      <th>PREVSETTLEPRICE</th>\n",
       "      <th>DECIMALS</th>\n",
       "      <th>MINSTEP</th>\n",
       "      <th>LASTTRADEDATE</th>\n",
       "      <th>LASTDELDATE</th>\n",
       "      <th>SECTYPE</th>\n",
       "      <th>...</th>\n",
       "      <th>HIGHLIMIT</th>\n",
       "      <th>LOWLIMIT</th>\n",
       "      <th>STEPPRICE</th>\n",
       "      <th>LASTSETTLEPRICE</th>\n",
       "      <th>PREVPRICE</th>\n",
       "      <th>IMTIME</th>\n",
       "      <th>BUYSELLFEE</th>\n",
       "      <th>SCALPERFEE</th>\n",
       "      <th>NEGOTIATEDFEE</th>\n",
       "      <th>EXERCISEFEE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GOM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>GLD-6.23</td>\n",
       "      <td>Фьючерсный контракт GLD-6.23</td>\n",
       "      <td>5270.1</td>\n",
       "      <td>1</td>\n",
       "      <td>0.1</td>\n",
       "      <td>2023-06-14</td>\n",
       "      <td>2023-06-15</td>\n",
       "      <td>GO</td>\n",
       "      <td>...</td>\n",
       "      <td>5467.9</td>\n",
       "      <td>4879.1</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5173.5</td>\n",
       "      <td>4969</td>\n",
       "      <td>2023-06-01 14:03:21</td>\n",
       "      <td>6.96</td>\n",
       "      <td>3.48</td>\n",
       "      <td>2.32</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>LKM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>LKOH-6.23</td>\n",
       "      <td>Фьючерсный контракт LKOH-6.23</td>\n",
       "      <td>51796.0</td>\n",
       "      <td>0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2023-06-15</td>\n",
       "      <td>2023-06-16</td>\n",
       "      <td>LK</td>\n",
       "      <td>...</td>\n",
       "      <td>60577.0</td>\n",
       "      <td>43573.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>52075.0</td>\n",
       "      <td>51760</td>\n",
       "      <td>2023-06-01 14:03:21</td>\n",
       "      <td>10.26</td>\n",
       "      <td>5.13</td>\n",
       "      <td>3.42</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MXM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>MIX-6.23</td>\n",
       "      <td>Фьючерсный контракт MIX-6.23</td>\n",
       "      <td>265650.0</td>\n",
       "      <td>0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>2023-06-15</td>\n",
       "      <td>2023-06-15</td>\n",
       "      <td>MX</td>\n",
       "      <td>...</td>\n",
       "      <td>285550.0</td>\n",
       "      <td>244800.0</td>\n",
       "      <td>25.0</td>\n",
       "      <td>265175.0</td>\n",
       "      <td>265550</td>\n",
       "      <td>2023-06-01 14:03:21</td>\n",
       "      <td>17.53</td>\n",
       "      <td>8.77</td>\n",
       "      <td>5.84</td>\n",
       "      <td>5.84</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3 rows × 25 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  SECID BOARDID  SHORTNAME                        SECNAME  PREVSETTLEPRICE  \\\n",
       "0  GOM3    RFUD   GLD-6.23   Фьючерсный контракт GLD-6.23           5270.1   \n",
       "1  LKM3    RFUD  LKOH-6.23  Фьючерсный контракт LKOH-6.23          51796.0   \n",
       "2  MXM3    RFUD   MIX-6.23   Фьючерсный контракт MIX-6.23         265650.0   \n",
       "\n",
       "   DECIMALS  MINSTEP LASTTRADEDATE LASTDELDATE SECTYPE  ... HIGHLIMIT  \\\n",
       "0         1      0.1    2023-06-14  2023-06-15      GO  ...    5467.9   \n",
       "1         0      1.0    2023-06-15  2023-06-16      LK  ...   60577.0   \n",
       "2         0     25.0    2023-06-15  2023-06-15      MX  ...  285550.0   \n",
       "\n",
       "   LOWLIMIT  STEPPRICE  LASTSETTLEPRICE  PREVPRICE               IMTIME  \\\n",
       "0    4879.1        1.0           5173.5       4969  2023-06-01 14:03:21   \n",
       "1   43573.0        1.0          52075.0      51760  2023-06-01 14:03:21   \n",
       "2  244800.0       25.0         265175.0     265550  2023-06-01 14:03:21   \n",
       "\n",
       "   BUYSELLFEE  SCALPERFEE  NEGOTIATEDFEE  EXERCISEFEE  \n",
       "0        6.96        3.48           2.32         0.00  \n",
       "1       10.26        5.13           3.42         0.00  \n",
       "2       17.53        8.77           5.84         5.84  \n",
       "\n",
       "[3 rows x 25 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "marketdata\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SECID</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>BID</th>\n",
       "      <th>OFFER</th>\n",
       "      <th>SPREAD</th>\n",
       "      <th>OPEN</th>\n",
       "      <th>HIGH</th>\n",
       "      <th>LOW</th>\n",
       "      <th>LAST</th>\n",
       "      <th>QUANTITY</th>\n",
       "      <th>...</th>\n",
       "      <th>NUMOFFERS</th>\n",
       "      <th>TIME</th>\n",
       "      <th>SETTLETOPREVSETTLEPRC</th>\n",
       "      <th>SEQNUM</th>\n",
       "      <th>SYSTIME</th>\n",
       "      <th>TRADEDATE</th>\n",
       "      <th>LASTTOPREVPRICE</th>\n",
       "      <th>OICHANGE</th>\n",
       "      <th>OPENPERIODPRICE</th>\n",
       "      <th>SWAPRATE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GOM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>221.9</td>\n",
       "      <td>4975.1</td>\n",
       "      <td>4975.1</td>\n",
       "      <td>4975</td>\n",
       "      <td>4975</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>10:37:11</td>\n",
       "      <td>-1.33</td>\n",
       "      <td>20230601153203</td>\n",
       "      <td>2023-06-01 15:32:03</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>0.12</td>\n",
       "      <td>-2</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>LKM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>16.0</td>\n",
       "      <td>51749.0</td>\n",
       "      <td>52593.0</td>\n",
       "      <td>51749</td>\n",
       "      <td>52591</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>15:55:43</td>\n",
       "      <td>1.48</td>\n",
       "      <td>20230601161052</td>\n",
       "      <td>2023-06-01 16:10:52</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>1.61</td>\n",
       "      <td>6700</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>MXM3</td>\n",
       "      <td>RFUD</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>25.0</td>\n",
       "      <td>265600.0</td>\n",
       "      <td>266975.0</td>\n",
       "      <td>264450</td>\n",
       "      <td>265500</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>15:55:29</td>\n",
       "      <td>-0.05</td>\n",
       "      <td>20230601161050</td>\n",
       "      <td>2023-06-01 16:10:50</td>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>1780</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3 rows × 35 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  SECID BOARDID   BID OFFER  SPREAD      OPEN      HIGH     LOW    LAST  \\\n",
       "0  GOM3    RFUD  None  None   221.9    4975.1    4975.1    4975    4975   \n",
       "1  LKM3    RFUD  None  None    16.0   51749.0   52593.0   51749   52591   \n",
       "2  MXM3    RFUD  None  None    25.0  265600.0  266975.0  264450  265500   \n",
       "\n",
       "   QUANTITY  ...  NUMOFFERS      TIME  SETTLETOPREVSETTLEPRC          SEQNUM  \\\n",
       "0         3  ...       None  10:37:11                  -1.33  20230601153203   \n",
       "1         1  ...       None  15:55:43                   1.48  20230601161052   \n",
       "2         3  ...       None  15:55:29                  -0.05  20230601161050   \n",
       "\n",
       "               SYSTIME   TRADEDATE  LASTTOPREVPRICE  OICHANGE OPENPERIODPRICE  \\\n",
       "0  2023-06-01 15:32:03  2023-06-01             0.12        -2             0.0   \n",
       "1  2023-06-01 16:10:52  2023-06-01             1.61      6700             0.0   \n",
       "2  2023-06-01 16:10:50  2023-06-01            -0.02      1780             0.0   \n",
       "\n",
       "   SWAPRATE  \n",
       "0       0.0  \n",
       "1       0.0  \n",
       "2       0.0  \n",
       "\n",
       "[3 rows x 35 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dataversion\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>data_version</th>\n",
       "      <th>seqnum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7343</td>\n",
       "      <td>20230601161055</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   data_version          seqnum\n",
       "0          7343  20230601161055"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "marketdata_yields\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>boardid</th>\n",
       "      <th>secid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [boardid, secid]\n",
       "Index: []"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(32, engine=\"futures\", market=\"forts\", board=\"RFUD\", nearest=1,\n",
    "                      assets=[\"MIX\", \"LKOH\", \"GLD\"]\n",
    "                     )\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "b5c738aa",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(32)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "b19a7287",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "33: Получить таблицу инструментов торговой сессии по рынку в целом.\n",
      "Глобальные сущности запроса: ['engine', 'market']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Справочник полей таблицы со статическими данными торговой сессии рынка\n",
      "marketdata: Данные с текущими значениями инструментов рынка\n",
      "dataversion: Версионность данных.\n",
      "marketdata_yields: Доходности\n",
      "\n",
      "Параметры запроса:\n",
      "``primary_board``: Показывать инструменты - только для главного режима торгов по бумаге.\n",
      "Фильтр работает только для фондового (stock) и валютного (currency) рынка.\n",
      "Будьте осторожны используя данный фильтр за пределами основных режимов торгов.\n",
      "Список главных режимов торгов: https://iss.moex.com/iss/securities/ колонка \"primary_boardid\".. \n",
      "``assets``: Фильтр по коду базового актива (только для срочного рынка). Колонка ASSETCODE.\n",
      "Пример: https://iss.moex.com/iss/engines/futures/markets/forts/securities?assets=EURRUBTOM,AFLT\n",
      "Ограничения: не более 5 типов бумаг.. \n",
      "``index``: Выводить акции из базы индекса.\n",
      "Только для фондового рынка.. \n",
      "``security_collection``: Фильтр по коллекции. \n",
      "``previous_session``: Данные предыдущей сессии для forts и options рынков  . Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH (не более 10 инструментов).. \n",
      "``first``: Отдать n первых строк. Значение по умолчанию: 0\n",
      "``sort_column``: \n",
      "``sort_order``: Значение по умолчанию: asc\n",
      "``leaders``: Лидеры торгов (только для futures/options). Значение по умолчанию: 0\n",
      "``nearest``: Выводить фьючерсы с ближайшей датой погашения. Значение по умолчанию: 0\n",
      "``sectypes``: Фильтр по типу инструмента (только для срочного и фондового рынков).\n",
      "Например:\n",
      "  - https://iss.moex.com/iss/engines/futures/markets/forts/securities?sectypes=ri,gz\n",
      "  - https://iss.moex.com/iss/engines/stock/markets/bonds/securities?sectypes=8\n",
      "Ограничения: не более 5 типов бумаг.\n",
      "!! Для срочного рынка устарело. Используйте фильтр \"assets\".. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/33\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/securities\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "9e0b3b83",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Аналогично\n",
    "FULL_ID.remove(33)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "457d8193",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "34: Получить все сделки по выбранному режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "trades: Перечень сделок\n",
      "dataversion: Версионность данных.\n",
      "trades_yields: Дополнительные доходности для сделок\n",
      "\n",
      "Параметры запроса:\n",
      "``tradeno``: Номер сделки, с которого следует начать возвращать данные.\n",
      "В данных возвращаются сделки начиная с номера переданной сделки переданого в параметре tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      "\n",
      "Сделки возвращаются в порядке их заключения. На срочном рынке номер более поздней сделки может быть менее номера предыдущей.\n",
      ". Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH. \n",
      "``limit``: Количество строк в данных. Доступные значения: 1, 10, 100, 1000, 5000. Значение по умолчанию: 5000\n",
      "``reversed``: обратный порядок сортировки. Значение по умолчанию: 0\n",
      "``previous_session``: Сделки предыдущей сессии для forts и options рынков.\n",
      "И для индексов.\n",
      ". Значение по умолчанию: 0\n",
      "``recno``: Только для срочного рынка (FORTS + OPTIONS).\n",
      "Фильтрация по полю RECNO (в порядке заключения сделок).\n",
      "\n",
      "Заменяет собой фильтр tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      ". Значение по умолчанию: 0\n",
      "``next_trade``: Не включать текущую сделку в выдачу.. Значение по умолчанию: 0\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``yielddatetype``: Тип доходности. Возможные значения\n",
      "- MBS\n",
      "- MATDATE\n",
      "- OFFERDATE. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/34\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/trades\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "9f6a0eac",
   "metadata": {},
   "outputs": [],
   "source": [
    "reload_moex()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "22540faa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trades\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>TRADENO</th>\n",
       "      <th>TRADETIME</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>SECID</th>\n",
       "      <th>PRICE</th>\n",
       "      <th>QUANTITY</th>\n",
       "      <th>VALUE</th>\n",
       "      <th>PERIOD</th>\n",
       "      <th>TRADETIME_GRP</th>\n",
       "      <th>SYSTIME</th>\n",
       "      <th>BUYSELL</th>\n",
       "      <th>DECIMALS</th>\n",
       "      <th>TRADINGSESSION</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7705999272</td>\n",
       "      <td>16:22:26</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.04</td>\n",
       "      <td>20</td>\n",
       "      <td>32408.0</td>\n",
       "      <td>N</td>\n",
       "      <td>1622</td>\n",
       "      <td>2023-06-01 16:22:26</td>\n",
       "      <td>B</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>7705999273</td>\n",
       "      <td>16:22:26</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.04</td>\n",
       "      <td>80</td>\n",
       "      <td>129632.0</td>\n",
       "      <td>N</td>\n",
       "      <td>1622</td>\n",
       "      <td>2023-06-01 16:22:26</td>\n",
       "      <td>B</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>7706000704</td>\n",
       "      <td>16:22:46</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.04</td>\n",
       "      <td>1</td>\n",
       "      <td>1620.4</td>\n",
       "      <td>N</td>\n",
       "      <td>1622</td>\n",
       "      <td>2023-06-01 16:22:47</td>\n",
       "      <td>B</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7706000812</td>\n",
       "      <td>16:22:49</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.04</td>\n",
       "      <td>29</td>\n",
       "      <td>46991.6</td>\n",
       "      <td>N</td>\n",
       "      <td>1622</td>\n",
       "      <td>2023-06-01 16:22:49</td>\n",
       "      <td>B</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7706000813</td>\n",
       "      <td>16:22:49</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.04</td>\n",
       "      <td>6</td>\n",
       "      <td>9722.4</td>\n",
       "      <td>N</td>\n",
       "      <td>1622</td>\n",
       "      <td>2023-06-01 16:22:49</td>\n",
       "      <td>B</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>7706001518</td>\n",
       "      <td>16:23:00</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.02</td>\n",
       "      <td>1</td>\n",
       "      <td>1620.2</td>\n",
       "      <td>N</td>\n",
       "      <td>1623</td>\n",
       "      <td>2023-06-01 16:23:01</td>\n",
       "      <td>S</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>7706001519</td>\n",
       "      <td>16:23:00</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.01</td>\n",
       "      <td>24</td>\n",
       "      <td>38882.4</td>\n",
       "      <td>N</td>\n",
       "      <td>1623</td>\n",
       "      <td>2023-06-01 16:23:01</td>\n",
       "      <td>S</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7706001520</td>\n",
       "      <td>16:23:00</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.01</td>\n",
       "      <td>1</td>\n",
       "      <td>1620.1</td>\n",
       "      <td>N</td>\n",
       "      <td>1623</td>\n",
       "      <td>2023-06-01 16:23:01</td>\n",
       "      <td>S</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>7706001521</td>\n",
       "      <td>16:23:00</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.01</td>\n",
       "      <td>24</td>\n",
       "      <td>38882.4</td>\n",
       "      <td>N</td>\n",
       "      <td>1623</td>\n",
       "      <td>2023-06-01 16:23:01</td>\n",
       "      <td>S</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>7706001597</td>\n",
       "      <td>16:23:01</td>\n",
       "      <td>TQBR</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>162.02</td>\n",
       "      <td>2</td>\n",
       "      <td>3240.4</td>\n",
       "      <td>N</td>\n",
       "      <td>1623</td>\n",
       "      <td>2023-06-01 16:23:02</td>\n",
       "      <td>S</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      TRADENO TRADETIME BOARDID SECID   PRICE  QUANTITY     VALUE PERIOD  \\\n",
       "0  7705999272  16:22:26    TQBR  GAZP  162.04        20   32408.0      N   \n",
       "1  7705999273  16:22:26    TQBR  GAZP  162.04        80  129632.0      N   \n",
       "2  7706000704  16:22:46    TQBR  GAZP  162.04         1    1620.4      N   \n",
       "3  7706000812  16:22:49    TQBR  GAZP  162.04        29   46991.6      N   \n",
       "4  7706000813  16:22:49    TQBR  GAZP  162.04         6    9722.4      N   \n",
       "5  7706001518  16:23:00    TQBR  GAZP  162.02         1    1620.2      N   \n",
       "6  7706001519  16:23:00    TQBR  GAZP  162.01        24   38882.4      N   \n",
       "7  7706001520  16:23:00    TQBR  GAZP  162.01         1    1620.1      N   \n",
       "8  7706001521  16:23:00    TQBR  GAZP  162.01        24   38882.4      N   \n",
       "9  7706001597  16:23:01    TQBR  GAZP  162.02         2    3240.4      N   \n",
       "\n",
       "   TRADETIME_GRP              SYSTIME BUYSELL  DECIMALS TRADINGSESSION  \n",
       "0           1622  2023-06-01 16:22:26       B         2              1  \n",
       "1           1622  2023-06-01 16:22:26       B         2              1  \n",
       "2           1622  2023-06-01 16:22:47       B         2              1  \n",
       "3           1622  2023-06-01 16:22:49       B         2              1  \n",
       "4           1622  2023-06-01 16:22:49       B         2              1  \n",
       "5           1623  2023-06-01 16:23:01       S         2              1  \n",
       "6           1623  2023-06-01 16:23:01       S         2              1  \n",
       "7           1623  2023-06-01 16:23:01       S         2              1  \n",
       "8           1623  2023-06-01 16:23:01       S         2              1  \n",
       "9           1623  2023-06-01 16:23:02       S         2              1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dataversion\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>data_version</th>\n",
       "      <th>seqnum</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>7816</td>\n",
       "      <td>20230601163935</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   data_version          seqnum\n",
       "0          7816  20230601163935"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trades_yields\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>boardid</th>\n",
       "      <th>secid</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: [boardid, secid]\n",
       "Index: []"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(34, engine=\"stock\", market=\"shares\", board=\"TQBR\", \n",
    "                      tradeno=7705999026,\n",
    "                      next_trade=1,\n",
    "                      securities=\"GAZP\"\n",
    "                     )\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "c6dfef10",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(34)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "7115b886",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "35: Получить все сделки рынка.\n",
      "Глобальные сущности запроса: ['engine', 'market']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "trades: Перечень сделок\n",
      "dataversion: Версионность данных.\n",
      "trades_yields: Дополнительные доходности для сделок\n",
      "\n",
      "Параметры запроса:\n",
      "``tradeno``: Номер сделки, с которого следует начать возвращать данные.\n",
      "В данных возвращаются сделки начиная с номера переданной сделки переданого в параметре tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      "\n",
      "Сделки возвращаются в порядке их заключения. На срочном рынке номер более поздней сделки может быть менее номера предыдущей.\n",
      ". Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH. \n",
      "``limit``: Количество строк в данных. Доступные значения: 1, 10, 100, 1000, 5000. Значение по умолчанию: 5000\n",
      "``reversed``: обратный порядок сортировки. Значение по умолчанию: 0\n",
      "``previous_session``: Сделки предыдущей сессии для forts и options рынков.\n",
      "И для индексов.\n",
      ". Значение по умолчанию: 0\n",
      "``recno``: Только для срочного рынка (FORTS + OPTIONS).\n",
      "Фильтрация по полю RECNO (в порядке заключения сделок).\n",
      "\n",
      "Заменяет собой фильтр tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      ". Значение по умолчанию: 0\n",
      "``next_trade``: Не включать текущую сделку в выдачу.. Значение по умолчанию: 0\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``yielddatetype``: Тип доходности. Возможные значения\n",
      "- MBS\n",
      "- MATDATE\n",
      "- OFFERDATE. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/35\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/trades\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "cfb68204",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Аналогично\n",
    "FULL_ID.remove(35)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "bf1e3b97",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "40: Получить доступные торговые системы.\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "engines: Список доступных торговых систем\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/40\n",
      "Темплейт: http://iss.moex.com/iss/engines\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 99,
   "id": "19db54ff",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике - engines\n",
    "FULL_ID.remove(40)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "a45c2acd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "41: Получить описание и режим работы торговой системы.\n",
      "Глобальные сущности запроса: ['engine']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "engine: Общие атрибуты ТС\n",
      "timetable: \n",
      "dailytable: \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/41\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "4cdda152",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Время и дни торгов, пропустим\n",
    "FULL_ID.remove(41)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "fd9b8e27",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "42: Получить список рынков торговой системы.\n",
      "Глобальные сущности запроса: ['engine']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "markets: Справочник доступных рынков и их атрибуты\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/42\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "765d53d4",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике\n",
    "FULL_ID.remove(42)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "01c0b1ff",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "43: Получить справочник режимов торгов рынка.\n",
      "Глобальные сущности запроса: ['engine', 'market']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "boards: Доступные режимы торгов рынка\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/43\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "3f013ed9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике\n",
    "FULL_ID.remove(43)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "02dc05e9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "44: Получить описание: словарь доступных режимов торгов, описание полей публикуемых таблиц данных и т.д.\n",
      "Глобальные сущности запроса: ['engine', 'market']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "boards: Доступные режимы торгов рынка\n",
      "boardgroups: Группы режимов торгов\n",
      "securities: Справочник полей таблицы со статическими данными торговой сессии рынка\n",
      "marketdata: Справочник полей таблицы котировок\n",
      "trades: Справочник полей таблицы сделок торговой сессии рынка\n",
      "orderbook: Справочник полей таблицы с котировками (стакана заявок)\n",
      "history: Справочник полей истории таблицы инструментов\n",
      "trades_hist: Справочник полей таблицы сделок архив реестра сделок\n",
      "marketdata_yields: \n",
      "trades_yields: \n",
      "history_yields: \n",
      "secstats: Описание полей таблицы \"Итоги для \"\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/44\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "65035e0e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "boards\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>board_group_id</th>\n",
       "      <th>boardid</th>\n",
       "      <th>title</th>\n",
       "      <th>is_traded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>122</td>\n",
       "      <td>122</td>\n",
       "      <td>AUBB</td>\n",
       "      <td>Выкуп: Аукцион - безадрес.</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>121</td>\n",
       "      <td>123</td>\n",
       "      <td>AUCT</td>\n",
       "      <td>Размещение: Аукцион - безадрес.</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>93</td>\n",
       "      <td>7</td>\n",
       "      <td>EQDB</td>\n",
       "      <td>Основной режим: Облигации Д - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>165</td>\n",
       "      <td>7</td>\n",
       "      <td>EQEO</td>\n",
       "      <td>Основной режим: Облигации (EUR) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>37</td>\n",
       "      <td>67</td>\n",
       "      <td>EQEU</td>\n",
       "      <td>Облигации (USD) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>228</td>\n",
       "      <td>67</td>\n",
       "      <td>EQGO</td>\n",
       "      <td>Облигации (GBP) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>EQNB</td>\n",
       "      <td>Основной режим: Облигации внесписочные - безад...</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>EQNO</td>\n",
       "      <td>Основной режим: Б-Облигации - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>EQOB</td>\n",
       "      <td>Т0 Облигации - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>9</td>\n",
       "      <td>7</td>\n",
       "      <td>EQOS</td>\n",
       "      <td>Основной режим: А2-Облигации - безадрес.</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id  board_group_id boardid  \\\n",
       "0  122             122    AUBB   \n",
       "1  121             123    AUCT   \n",
       "2   93               7    EQDB   \n",
       "3  165               7    EQEO   \n",
       "4   37              67    EQEU   \n",
       "5  228              67    EQGO   \n",
       "6    6               7    EQNB   \n",
       "7    7               7    EQNO   \n",
       "8    8               7    EQOB   \n",
       "9    9               7    EQOS   \n",
       "\n",
       "                                               title  is_traded  \n",
       "0                         Выкуп: Аукцион - безадрес.          1  \n",
       "1                    Размещение: Аукцион - безадрес.          1  \n",
       "2            Основной режим: Облигации Д - безадрес.          0  \n",
       "3        Основной режим: Облигации (EUR) - безадрес.          0  \n",
       "4                        Облигации (USD) - безадрес.          0  \n",
       "5                        Облигации (GBP) - безадрес.          0  \n",
       "6  Основной режим: Облигации внесписочные - безад...          0  \n",
       "7            Основной режим: Б-Облигации - безадрес.          0  \n",
       "8                           Т0 Облигации - безадрес.          0  \n",
       "9           Основной режим: А2-Облигации - безадрес.          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "boardgroups\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>slug</th>\n",
       "      <th>title</th>\n",
       "      <th>is_default</th>\n",
       "      <th>is_traded</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>58</td>\n",
       "      <td>stock_bonds_tplus</td>\n",
       "      <td>Т+: Основной режим - безадрес.</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>193</td>\n",
       "      <td>stock_bonds_tplus_usd</td>\n",
       "      <td>Т+: Основной режим (USD) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>68</td>\n",
       "      <td>stock_etc_tplus</td>\n",
       "      <td>Т+: Основной режим (ЕТС) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>7</td>\n",
       "      <td>stock_bonds</td>\n",
       "      <td>Т0: Основной режим - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>105</td>\n",
       "      <td>stock_bonds_settle</td>\n",
       "      <td>Поставка по СК</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>69</td>\n",
       "      <td>stock_etc</td>\n",
       "      <td>Т0: Основной режим (ЕТС) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>67</td>\n",
       "      <td>stock_bonds_euro</td>\n",
       "      <td>Т0: Основной режим (Еврооблигации) - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>122</td>\n",
       "      <td>stock_bonds_buyback</td>\n",
       "      <td>Выкуп - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>123</td>\n",
       "      <td>stock_bonds_distribution</td>\n",
       "      <td>Размещение - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>77</td>\n",
       "      <td>stock_bonds_darkpools</td>\n",
       "      <td>Крупные пакеты - безадрес.</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id                      slug  \\\n",
       "0   58         stock_bonds_tplus   \n",
       "1  193     stock_bonds_tplus_usd   \n",
       "2   68           stock_etc_tplus   \n",
       "3    7               stock_bonds   \n",
       "4  105        stock_bonds_settle   \n",
       "5   69                 stock_etc   \n",
       "6   67          stock_bonds_euro   \n",
       "7  122       stock_bonds_buyback   \n",
       "8  123  stock_bonds_distribution   \n",
       "9   77     stock_bonds_darkpools   \n",
       "\n",
       "                                            title  is_default  is_traded  \n",
       "0                  Т+: Основной режим - безадрес.           1          1  \n",
       "1            Т+: Основной режим (USD) - безадрес.           0          1  \n",
       "2            Т+: Основной режим (ЕТС) - безадрес.           0          0  \n",
       "3                  Т0: Основной режим - безадрес.           0          0  \n",
       "4                                  Поставка по СК           0          1  \n",
       "5            Т0: Основной режим (ЕТС) - безадрес.           0          0  \n",
       "6  Т0: Основной режим (Еврооблигации) - безадрес.           0          0  \n",
       "7                               Выкуп - безадрес.           0          1  \n",
       "8                          Размещение - безадрес.           0          1  \n",
       "9                      Крупные пакеты - безадрес.           0          1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securities\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1954</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Идентификатор финансового инструмента</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1920</td>\n",
       "      <td>SHORTNAME</td>\n",
       "      <td>Кратк. наим.</td>\n",
       "      <td>Краткое наименование ценной бумаги</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1940</td>\n",
       "      <td>PREVWAPRICE</td>\n",
       "      <td>Средневзвешенная цена предыдущего дня, % к ном...</td>\n",
       "      <td>Средневзвешенная цена предыдущего дня, % к ном...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1941</td>\n",
       "      <td>YIELDATPREVWAPRICE</td>\n",
       "      <td>Доходность по оценке пред. дня</td>\n",
       "      <td>Доходность по оценке пред. дня</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1936</td>\n",
       "      <td>COUPONVALUE</td>\n",
       "      <td>Сумма купона</td>\n",
       "      <td>Сумма купона, в валюте номинала</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1938</td>\n",
       "      <td>NEXTCOUPON</td>\n",
       "      <td>Дата окончания купона</td>\n",
       "      <td>Дата окончания купона</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1934</td>\n",
       "      <td>ACCRUEDINT</td>\n",
       "      <td>НКД</td>\n",
       "      <td>НКД на дату расчетов, в валюте расчетов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1931</td>\n",
       "      <td>PREVPRICE</td>\n",
       "      <td>Последняя цена пред. дня</td>\n",
       "      <td>Цена последней сделки пред. дня, % к номиналу</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1926</td>\n",
       "      <td>LOTSIZE</td>\n",
       "      <td>Размер лота</td>\n",
       "      <td>Размер лота, ц.б.</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1928</td>\n",
       "      <td>FACEVALUE</td>\n",
       "      <td>Непог.долг</td>\n",
       "      <td>Непогашенный долг</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id                name  \\\n",
       "0  1954               SECID   \n",
       "1  1920           SHORTNAME   \n",
       "2  1940         PREVWAPRICE   \n",
       "3  1941  YIELDATPREVWAPRICE   \n",
       "4  1936         COUPONVALUE   \n",
       "5  1938          NEXTCOUPON   \n",
       "6  1934          ACCRUEDINT   \n",
       "7  1931           PREVPRICE   \n",
       "8  1926             LOTSIZE   \n",
       "9  1928           FACEVALUE   \n",
       "\n",
       "                                         short_title  \\\n",
       "0                                    Код инструмента   \n",
       "1                                       Кратк. наим.   \n",
       "2  Средневзвешенная цена предыдущего дня, % к ном...   \n",
       "3                     Доходность по оценке пред. дня   \n",
       "4                                       Сумма купона   \n",
       "5                              Дата окончания купона   \n",
       "6                                                НКД   \n",
       "7                           Последняя цена пред. дня   \n",
       "8                                        Размер лота   \n",
       "9                                         Непог.долг   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0              Идентификатор финансового инструмента           1          0   \n",
       "1                 Краткое наименование ценной бумаги           1          0   \n",
       "2  Средневзвешенная цена предыдущего дня, % к ном...           0          0   \n",
       "3                     Доходность по оценке пред. дня           0          0   \n",
       "4                    Сумма купона, в валюте номинала           0          0   \n",
       "5                              Дата окончания купона           0          0   \n",
       "6            НКД на дату расчетов, в валюте расчетов           0          0   \n",
       "7      Цена последней сделки пред. дня, % к номиналу           0          0   \n",
       "8                                  Размер лота, ц.б.           0          0   \n",
       "9                                  Непогашенный долг           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          0     None          0            0  string        NaN          0  \n",
       "1          0     None          0            0  string        NaN          1  \n",
       "2          1     None          0            0  number        NaN          0  \n",
       "3          0     None          0            0  number        NaN          0  \n",
       "4          1     None          0            0  number        NaN          0  \n",
       "5          1     None          0            0    date        NaN          0  \n",
       "6          0     None          0            0  number        2.0          0  \n",
       "7          0     None          0            0  number        NaN          0  \n",
       "8          0     None          0            0  number        0.0          0  \n",
       "9          0     None          0            0  number        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "marketdata\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1954</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Идентификатор финансового инструмента</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1956</td>\n",
       "      <td>BID</td>\n",
       "      <td>Спрос</td>\n",
       "      <td>Спрос</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1957</td>\n",
       "      <td>BIDDEPTH</td>\n",
       "      <td>Объем лучшей котировки на покупку, штук</td>\n",
       "      <td>Объем лучшей котировки на покупку, штук</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1960</td>\n",
       "      <td>OFFER</td>\n",
       "      <td>Предложение</td>\n",
       "      <td>Предложение</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1961</td>\n",
       "      <td>OFFERDEPTH</td>\n",
       "      <td>Объем лучшей котировки на продажу, штук</td>\n",
       "      <td>Объем лучшей котировки на продажу, штук</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2006</td>\n",
       "      <td>SPREAD</td>\n",
       "      <td>Спред</td>\n",
       "      <td>Разница между лучшей котировкой на продажу и п...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1958</td>\n",
       "      <td>BIDDEPTHT</td>\n",
       "      <td>Совокупный спрос</td>\n",
       "      <td>Совокупный спрос</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>1962</td>\n",
       "      <td>OFFERDEPTHT</td>\n",
       "      <td>Общий объем на продажу</td>\n",
       "      <td>Общий объем котировок на продажу, лотов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1964</td>\n",
       "      <td>OPEN</td>\n",
       "      <td>Первая, %</td>\n",
       "      <td>Цена первой сделки, % к номиналу</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1966</td>\n",
       "      <td>LOW</td>\n",
       "      <td>Минимум, %</td>\n",
       "      <td>Минимальная цена сделки, % к номиналу</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id         name                              short_title  \\\n",
       "0  1954        SECID                          Код инструмента   \n",
       "1  1956          BID                                    Спрос   \n",
       "2  1957     BIDDEPTH  Объем лучшей котировки на покупку, штук   \n",
       "3  1960        OFFER                              Предложение   \n",
       "4  1961   OFFERDEPTH  Объем лучшей котировки на продажу, штук   \n",
       "5  2006       SPREAD                                    Спред   \n",
       "6  1958    BIDDEPTHT                         Совокупный спрос   \n",
       "7  1962  OFFERDEPTHT                   Общий объем на продажу   \n",
       "8  1964         OPEN                                Первая, %   \n",
       "9  1966          LOW                               Минимум, %   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0              Идентификатор финансового инструмента           1          0   \n",
       "1                                              Спрос           0          0   \n",
       "2            Объем лучшей котировки на покупку, штук           0          0   \n",
       "3                                        Предложение           0          0   \n",
       "4            Объем лучшей котировки на продажу, штук           0          0   \n",
       "5  Разница между лучшей котировкой на продажу и п...           0          0   \n",
       "6                                   Совокупный спрос           0          0   \n",
       "7            Общий объем котировок на продажу, лотов           0          0   \n",
       "8                   Цена первой сделки, % к номиналу           0          0   \n",
       "9              Минимальная цена сделки, % к номиналу           0          0   \n",
       "\n",
       "   is_hidden  trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          0       NaN          0            0  string        NaN          0  \n",
       "1          0       NaN          0            0  number        NaN          0  \n",
       "2          0       NaN          0            0  number        0.0          0  \n",
       "3          0       NaN          0            0  number        NaN          0  \n",
       "4          0       NaN          0            0  number        0.0          0  \n",
       "5          0       NaN          0            0  number        NaN          0  \n",
       "6          0       NaN          0            0  number        0.0          0  \n",
       "7          0       NaN          0            0  number        0.0          0  \n",
       "8          0       NaN          0            0  number        NaN          0  \n",
       "9          0       NaN          0            0  number        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trades\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>307</td>\n",
       "      <td>TRADENO</td>\n",
       "      <td>Сделка No</td>\n",
       "      <td>Номер сделки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>308</td>\n",
       "      <td>TRADETIME</td>\n",
       "      <td>Время</td>\n",
       "      <td>Время заключения сделки, чч:мм:сс</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>310</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>311</td>\n",
       "      <td>PRICE</td>\n",
       "      <td>Цена</td>\n",
       "      <td>Цена, в валюте расчетов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>312</td>\n",
       "      <td>QUANTITY</td>\n",
       "      <td>Объем, лотов</td>\n",
       "      <td>Объем сделки, лотов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>314</td>\n",
       "      <td>PERIOD</td>\n",
       "      <td>Период</td>\n",
       "      <td>Период торговой сессии, когда была заключена с...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>313</td>\n",
       "      <td>VALUE</td>\n",
       "      <td>Объем сделки</td>\n",
       "      <td>Объем сделки, в валюте расчетов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>315</td>\n",
       "      <td>YIELD</td>\n",
       "      <td>Доходность сделки</td>\n",
       "      <td>Доходность сделки, % годовых</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>309</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима торгов</td>\n",
       "      <td>Код режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3178</td>\n",
       "      <td>SYSTIME</td>\n",
       "      <td>Время загрузки</td>\n",
       "      <td>Время загрузки данных системой</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id       name        short_title  \\\n",
       "0   307    TRADENO          Сделка No   \n",
       "1   308  TRADETIME              Время   \n",
       "2   310      SECID    Код инструмента   \n",
       "3   311      PRICE               Цена   \n",
       "4   312   QUANTITY       Объем, лотов   \n",
       "5   314     PERIOD             Период   \n",
       "6   313      VALUE       Объем сделки   \n",
       "7   315      YIELD  Доходность сделки   \n",
       "8   309    BOARDID  Код режима торгов   \n",
       "9  3178    SYSTIME     Время загрузки   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                       Номер сделки           0          0   \n",
       "1                  Время заключения сделки, чч:мм:сс           0          0   \n",
       "2                                    Код инструмента           0          0   \n",
       "3                            Цена, в валюте расчетов           0          0   \n",
       "4                                Объем сделки, лотов           0          0   \n",
       "5  Период торговой сессии, когда была заключена с...           0          0   \n",
       "6                    Объем сделки, в валюте расчетов           0          0   \n",
       "7                       Доходность сделки, % годовых           0          0   \n",
       "8                                  Код режима торгов           0          0   \n",
       "9                     Время загрузки данных системой           0          1   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          0     None          0            0  number        0.0          0  \n",
       "1          0     None          0            0    time        NaN          0  \n",
       "2          0     None          0            0  string        NaN          0  \n",
       "3          0     None          0            0  number        NaN          0  \n",
       "4          0     None          0            0  number        0.0          0  \n",
       "5          0     None          0            0  string        NaN          0  \n",
       "6          0     None          0            0  number        NaN          0  \n",
       "7          0     None          0            0  number        NaN          0  \n",
       "8          1     None          0            0  string        NaN          0  \n",
       "9          1     None          0            0    date        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "orderbook\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>155</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>154</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима торгов</td>\n",
       "      <td>Режим торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>156</td>\n",
       "      <td>BUYSELL</td>\n",
       "      <td>К/П</td>\n",
       "      <td>Направленность заявки, приведшая к заключению ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>157</td>\n",
       "      <td>PRICE</td>\n",
       "      <td>Цена</td>\n",
       "      <td>Цена котировки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>158</td>\n",
       "      <td>QUANTITY</td>\n",
       "      <td>Объем котировки, лотов</td>\n",
       "      <td>Объем котировки, лотов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>159</td>\n",
       "      <td>YIELD</td>\n",
       "      <td>Доходность</td>\n",
       "      <td>Доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>160</td>\n",
       "      <td>UPDATETIME</td>\n",
       "      <td>Время</td>\n",
       "      <td>Время последнего обновления</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>161</td>\n",
       "      <td>SEQNUM</td>\n",
       "      <td>номер обновления (служебное поле)</td>\n",
       "      <td>номер обновления (служебное поле)</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3150</td>\n",
       "      <td>SYSTIME</td>\n",
       "      <td>Время загрузки</td>\n",
       "      <td>Время загрузки данных системой</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id        name                        short_title  \\\n",
       "0   155       SECID                    Код инструмента   \n",
       "1   154     BOARDID                  Код режима торгов   \n",
       "2   156     BUYSELL                                К/П   \n",
       "3   157       PRICE                               Цена   \n",
       "4   158    QUANTITY             Объем котировки, лотов   \n",
       "5   159       YIELD                         Доходность   \n",
       "6   160  UPDATETIME                              Время   \n",
       "7   161      SEQNUM  номер обновления (служебное поле)   \n",
       "8  3150     SYSTIME                     Время загрузки   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                    Код инструмента           0          0   \n",
       "1                                       Режим торгов           0          0   \n",
       "2  Направленность заявки, приведшая к заключению ...           0          0   \n",
       "3                                     Цена котировки           0          0   \n",
       "4                             Объем котировки, лотов           0          0   \n",
       "5                                         Доходность           0          0   \n",
       "6                        Время последнего обновления           0          1   \n",
       "7                  номер обновления (служебное поле)           0          1   \n",
       "8                     Время загрузки данных системой           0          1   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          1     None          0            0  string        NaN          0  \n",
       "1          1     None          0            0  string        NaN          0  \n",
       "2          0     None          0            0  string        NaN          0  \n",
       "3          0     None          0            0  number        NaN          0  \n",
       "4          0     None          0            0  number        NaN          0  \n",
       "5          0     None          0            0  number        NaN          0  \n",
       "6          1     None          0            0    time        NaN          0  \n",
       "7          1     None          0            0  number        0.0          0  \n",
       "8          1     None          0            0    date        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "history\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2745</td>\n",
       "      <td>TRADEDATE</td>\n",
       "      <td>Дата торгов</td>\n",
       "      <td>Дата торгов</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2746</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Идентификатор финансового инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>855</td>\n",
       "      <td>BOARDNAME</td>\n",
       "      <td>Режим торгов</td>\n",
       "      <td>Режим торгов</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2743</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>850</td>\n",
       "      <td>SHORTNAME</td>\n",
       "      <td>Кратк. наим.</td>\n",
       "      <td>Краткое наименование</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>853</td>\n",
       "      <td>REGNUMBER</td>\n",
       "      <td>Код гос. регистрации</td>\n",
       "      <td>Код гос. регистрации</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3314</td>\n",
       "      <td>ISIN</td>\n",
       "      <td>Код ISIN</td>\n",
       "      <td>Код ISIN</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3316</td>\n",
       "      <td>MATDATE</td>\n",
       "      <td>Дата погашения</td>\n",
       "      <td>Дата погашения</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3313</td>\n",
       "      <td>LISTNAME</td>\n",
       "      <td>Уровень листинга</td>\n",
       "      <td>Уровень листинга</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2744</td>\n",
       "      <td>FACEVALUE</td>\n",
       "      <td>Непог.долг</td>\n",
       "      <td>Непогашенный долг</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id       name           short_title  \\\n",
       "0  2745  TRADEDATE           Дата торгов   \n",
       "1  2746      SECID       Код инструмента   \n",
       "2   855  BOARDNAME          Режим торгов   \n",
       "3  2743    BOARDID            Код режима   \n",
       "4   850  SHORTNAME          Кратк. наим.   \n",
       "5   853  REGNUMBER  Код гос. регистрации   \n",
       "6  3314       ISIN              Код ISIN   \n",
       "7  3316    MATDATE        Дата погашения   \n",
       "8  3313   LISTNAME      Уровень листинга   \n",
       "9  2744  FACEVALUE            Непог.долг   \n",
       "\n",
       "                                   title  is_ordered  is_system  is_hidden  \\\n",
       "0                            Дата торгов           1          0          0   \n",
       "1  Идентификатор финансового инструмента           0          0          0   \n",
       "2                           Режим торгов           1          0          0   \n",
       "3            Идентификатор режима торгов           0          0          0   \n",
       "4                   Краткое наименование           1          0          0   \n",
       "5                   Код гос. регистрации           1          0          0   \n",
       "6                               Код ISIN           1          0          0   \n",
       "7                         Дата погашения           1          0          0   \n",
       "8                       Уровень листинга           0          0          0   \n",
       "9                      Непогашенный долг           0          0          0   \n",
       "\n",
       "   trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0       NaN          0            0    date        NaN          0  \n",
       "1       NaN          0            0  string        NaN          0  \n",
       "2       NaN          0            0  string        NaN          0  \n",
       "3       NaN          0            0  string        NaN          0  \n",
       "4       NaN          0            0  string        NaN          1  \n",
       "5       NaN          0            0  string        NaN          0  \n",
       "6       NaN          0            0  string        NaN          0  \n",
       "7       NaN          0            0    date        NaN          0  \n",
       "8       NaN          0            0  string        NaN          0  \n",
       "9       NaN          0            0  number        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trades_hist\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>3106</td>\n",
       "      <td>TRADENO</td>\n",
       "      <td>Номер сделки</td>\n",
       "      <td>Номер сделки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3099</td>\n",
       "      <td>TRADEDATE</td>\n",
       "      <td>Дата торгов</td>\n",
       "      <td>Дата торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3104</td>\n",
       "      <td>TRADETIME</td>\n",
       "      <td>Время</td>\n",
       "      <td>Время заключения сделки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3098</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Инструмент</td>\n",
       "      <td>Идентификатор финансового инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>3100</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Режим торгов</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>3101</td>\n",
       "      <td>PRICE</td>\n",
       "      <td>Цена сделки</td>\n",
       "      <td>Цена сделки, % к номиналу</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3107</td>\n",
       "      <td>QUANTITY</td>\n",
       "      <td>Объем, шт.</td>\n",
       "      <td>Объем сделки, штук</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3102</td>\n",
       "      <td>VALUE</td>\n",
       "      <td>Объем, руб.</td>\n",
       "      <td>Объем сделки, рублей</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3105</td>\n",
       "      <td>YIELD</td>\n",
       "      <td>Доходность сделки</td>\n",
       "      <td>Доходность сделки, % годовых</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>3103</td>\n",
       "      <td>ACCINT</td>\n",
       "      <td>НКД</td>\n",
       "      <td>Накопленный купонный доход (НКД), по одной цен...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id       name        short_title  \\\n",
       "0  3106    TRADENO       Номер сделки   \n",
       "1  3099  TRADEDATE        Дата торгов   \n",
       "2  3104  TRADETIME              Время   \n",
       "3  3098      SECID         Инструмент   \n",
       "4  3100    BOARDID       Режим торгов   \n",
       "5  3101      PRICE        Цена сделки   \n",
       "6  3107   QUANTITY         Объем, шт.   \n",
       "7  3102      VALUE        Объем, руб.   \n",
       "8  3105      YIELD  Доходность сделки   \n",
       "9  3103     ACCINT                НКД   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                       Номер сделки           0          0   \n",
       "1                                        Дата торгов           0          0   \n",
       "2                            Время заключения сделки           0          0   \n",
       "3              Идентификатор финансового инструмента           0          0   \n",
       "4                        Идентификатор режима торгов           0          0   \n",
       "5                          Цена сделки, % к номиналу           0          0   \n",
       "6                                 Объем сделки, штук           0          0   \n",
       "7                               Объем сделки, рублей           0          0   \n",
       "8                       Доходность сделки, % годовых           0          0   \n",
       "9  Накопленный купонный доход (НКД), по одной цен...           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          0     None          0            0  number        NaN          0  \n",
       "1          0     None          0            0    date        NaN          0  \n",
       "2          0     None          0            0    time        NaN          0  \n",
       "3          0     None          0            0  string        NaN          0  \n",
       "4          0     None          0            0  string        NaN          0  \n",
       "5          0     None          0            0  number        NaN          0  \n",
       "6          0     None          0            0  number        NaN          0  \n",
       "7          0     None          0            0  number        NaN          0  \n",
       "8          0     None          0            0  number        NaN          0  \n",
       "9          0     None          0            0  number        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "marketdata_yields\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6153</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6155</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6157</td>\n",
       "      <td>PRICE</td>\n",
       "      <td>Цена</td>\n",
       "      <td>Цена по которой была рассчитана доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6159</td>\n",
       "      <td>YIELDDATE</td>\n",
       "      <td>Дата, к кот.рассч.дох.</td>\n",
       "      <td>Дата, к которой рассчитывается доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6161</td>\n",
       "      <td>ZCYCMOMENT</td>\n",
       "      <td>Маркер КБД</td>\n",
       "      <td>Дата-временной маркер использованной в расчета...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>datetime</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6163</td>\n",
       "      <td>YIELDDATETYPE</td>\n",
       "      <td>Тип даты, к кот. расч. пар.</td>\n",
       "      <td>Тип даты, к которой рассчитывается доходность ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6165</td>\n",
       "      <td>EFFECTIVEYIELD</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6167</td>\n",
       "      <td>DURATION</td>\n",
       "      <td>Дюрация</td>\n",
       "      <td>Дюрация, дней</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6169</td>\n",
       "      <td>ZSPREADBP</td>\n",
       "      <td>Z-spread</td>\n",
       "      <td>Z-spread</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>6171</td>\n",
       "      <td>GSPREADBP</td>\n",
       "      <td>G-spread</td>\n",
       "      <td>G-spread</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id            name                  short_title  \\\n",
       "0  6153           SECID              Код инструмента   \n",
       "1  6155         BOARDID                   Код режима   \n",
       "2  6157           PRICE                         Цена   \n",
       "3  6159       YIELDDATE       Дата, к кот.рассч.дох.   \n",
       "4  6161      ZCYCMOMENT                   Маркер КБД   \n",
       "5  6163   YIELDDATETYPE  Тип даты, к кот. расч. пар.   \n",
       "6  6165  EFFECTIVEYIELD       Эффективная доходность   \n",
       "7  6167        DURATION                      Дюрация   \n",
       "8  6169       ZSPREADBP                     Z-spread   \n",
       "9  6171       GSPREADBP                     G-spread   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                    Код инструмента           0          0   \n",
       "1                        Идентификатор режима торгов           0          0   \n",
       "2         Цена по которой была рассчитана доходность           0          0   \n",
       "3          Дата, к которой рассчитывается доходность           0          0   \n",
       "4  Дата-временной маркер использованной в расчета...           0          0   \n",
       "5  Тип даты, к которой рассчитывается доходность ...           0          0   \n",
       "6                             Эффективная доходность           0          0   \n",
       "7                                      Дюрация, дней           0          0   \n",
       "8                                           Z-spread           0          0   \n",
       "9                                           G-spread           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent      type  precision  is_linked  \n",
       "0          0     None          0            0    string        NaN          0  \n",
       "1          0     None          0            0    string        NaN          0  \n",
       "2          0     None          0            0    number        NaN          0  \n",
       "3          0     None          0            0      date        NaN          0  \n",
       "4          0     None          0            0  datetime        NaN          0  \n",
       "5          0     None          0            0    string        NaN          0  \n",
       "6          0     None          0            0    number        4.0          0  \n",
       "7          0     None          0            0    number        0.0          0  \n",
       "8          0     None          0            0    number        0.0          0  \n",
       "9          0     None          0            0    number        0.0          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trades_yields\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6133</td>\n",
       "      <td>TRADENO</td>\n",
       "      <td>Сделка No</td>\n",
       "      <td>Номер сделки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6135</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6137</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6139</td>\n",
       "      <td>ZCYCMOMENT</td>\n",
       "      <td>Маркер КБД</td>\n",
       "      <td>Дата-временной маркер использованной в расчета...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>datetime</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6141</td>\n",
       "      <td>YIELDDATETYPE</td>\n",
       "      <td>Тип даты, к кот. расч. пар.</td>\n",
       "      <td>Тип даты, к которой рассчитывается доходность ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6143</td>\n",
       "      <td>EFFECTIVEYIELD</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6145</td>\n",
       "      <td>DURATION</td>\n",
       "      <td>Дюрация</td>\n",
       "      <td>Дюрация, дней</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6147</td>\n",
       "      <td>ZSPREADBP</td>\n",
       "      <td>Z-spread</td>\n",
       "      <td>Z-spread</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6149</td>\n",
       "      <td>GSPREADBP</td>\n",
       "      <td>G-spread</td>\n",
       "      <td>G-spread</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>6151</td>\n",
       "      <td>SYSTIME</td>\n",
       "      <td>Время загрузки</td>\n",
       "      <td>Время загрузки данных системой (служебное поле)</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>datetime</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id            name                  short_title  \\\n",
       "0  6133         TRADENO                    Сделка No   \n",
       "1  6135           SECID              Код инструмента   \n",
       "2  6137         BOARDID                   Код режима   \n",
       "3  6139      ZCYCMOMENT                   Маркер КБД   \n",
       "4  6141   YIELDDATETYPE  Тип даты, к кот. расч. пар.   \n",
       "5  6143  EFFECTIVEYIELD       Эффективная доходность   \n",
       "6  6145        DURATION                      Дюрация   \n",
       "7  6147       ZSPREADBP                     Z-spread   \n",
       "8  6149       GSPREADBP                     G-spread   \n",
       "9  6151         SYSTIME               Время загрузки   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                       Номер сделки           0          0   \n",
       "1                                    Код инструмента           0          0   \n",
       "2                        Идентификатор режима торгов           0          0   \n",
       "3  Дата-временной маркер использованной в расчета...           0          0   \n",
       "4  Тип даты, к которой рассчитывается доходность ...           0          0   \n",
       "5                             Эффективная доходность           0          0   \n",
       "6                                      Дюрация, дней           0          0   \n",
       "7                                           Z-spread           0          0   \n",
       "8                                           G-spread           0          0   \n",
       "9    Время загрузки данных системой (служебное поле)           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent      type  precision  is_linked  \n",
       "0          0     None          0            0    number        0.0          0  \n",
       "1          0     None          0            0    string        NaN          0  \n",
       "2          0     None          0            0    string        NaN          0  \n",
       "3          0     None          0            0  datetime        NaN          0  \n",
       "4          0     None          0            0    string        NaN          0  \n",
       "5          0     None          0            0    number        4.0          0  \n",
       "6          0     None          0            0    number        0.0          0  \n",
       "7          0     None          0            0    number        0.0          0  \n",
       "8          0     None          0            0    number        0.0          0  \n",
       "9          0     None          0            0  datetime        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "history_yields\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6325</td>\n",
       "      <td>TRADEDATE</td>\n",
       "      <td>Дата</td>\n",
       "      <td>Дата торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6327</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6329</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6331</td>\n",
       "      <td>YIELDDATE</td>\n",
       "      <td>Дата, к кот.рассч.дох.</td>\n",
       "      <td>Дата, к которой рассчитывается доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>date</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6333</td>\n",
       "      <td>YIELDDATETYPE</td>\n",
       "      <td>Тип даты, к кот. расч. пар.</td>\n",
       "      <td>Тип даты, к которой рассчитывается доходность ...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6335</td>\n",
       "      <td>PRICE</td>\n",
       "      <td>Цена</td>\n",
       "      <td>Цена по которой была рассчитана доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6337</td>\n",
       "      <td>ACCINT</td>\n",
       "      <td>НКД</td>\n",
       "      <td>НКД на дату расчетов, в валюте расчетов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6339</td>\n",
       "      <td>ZCYCMOMENT</td>\n",
       "      <td>Маркер КБД</td>\n",
       "      <td>Дата-временной маркер использованной в расчета...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>datetime</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6341</td>\n",
       "      <td>EFFECTIVEYIELD</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>Эффективная доходность</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>4.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>6343</td>\n",
       "      <td>DURATION</td>\n",
       "      <td>Дюрация</td>\n",
       "      <td>Дюрация, дней</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id            name                  short_title  \\\n",
       "0  6325       TRADEDATE                         Дата   \n",
       "1  6327           SECID              Код инструмента   \n",
       "2  6329         BOARDID                   Код режима   \n",
       "3  6331       YIELDDATE       Дата, к кот.рассч.дох.   \n",
       "4  6333   YIELDDATETYPE  Тип даты, к кот. расч. пар.   \n",
       "5  6335           PRICE                         Цена   \n",
       "6  6337          ACCINT                          НКД   \n",
       "7  6339      ZCYCMOMENT                   Маркер КБД   \n",
       "8  6341  EFFECTIVEYIELD       Эффективная доходность   \n",
       "9  6343        DURATION                      Дюрация   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0                                        Дата торгов           0          0   \n",
       "1                                    Код инструмента           0          0   \n",
       "2                        Идентификатор режима торгов           0          0   \n",
       "3          Дата, к которой рассчитывается доходность           0          0   \n",
       "4  Тип даты, к которой рассчитывается доходность ...           0          0   \n",
       "5         Цена по которой была рассчитана доходность           0          0   \n",
       "6            НКД на дату расчетов, в валюте расчетов           0          0   \n",
       "7  Дата-временной маркер использованной в расчета...           0          0   \n",
       "8                             Эффективная доходность           0          0   \n",
       "9                                      Дюрация, дней           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent      type  precision  is_linked  \n",
       "0          0     None          0            0      date        NaN          0  \n",
       "1          0     None          0            0    string        NaN          0  \n",
       "2          0     None          0            0    string        NaN          0  \n",
       "3          0     None          0            0      date        NaN          0  \n",
       "4          0     None          0            0    string        NaN          0  \n",
       "5          0     None          0            0    number        NaN          0  \n",
       "6          0     None          0            0    number        2.0          0  \n",
       "7          0     None          0            0  datetime        NaN          0  \n",
       "8          0     None          0            0    number        4.0          0  \n",
       "9          0     None          0            0    number        0.0          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "secstats\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>short_title</th>\n",
       "      <th>title</th>\n",
       "      <th>is_ordered</th>\n",
       "      <th>is_system</th>\n",
       "      <th>is_hidden</th>\n",
       "      <th>trend_by</th>\n",
       "      <th>is_signed</th>\n",
       "      <th>has_percent</th>\n",
       "      <th>type</th>\n",
       "      <th>precision</th>\n",
       "      <th>is_linked</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>6515</td>\n",
       "      <td>SECID</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Идентификатор финансового инструмента</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>6517</td>\n",
       "      <td>BOARDID</td>\n",
       "      <td>Код режима</td>\n",
       "      <td>Идентификатор режима торгов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>6519</td>\n",
       "      <td>TRADINGSESSION</td>\n",
       "      <td>Торговая сессия</td>\n",
       "      <td>Торговая сессия</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>string</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>6521</td>\n",
       "      <td>TIME</td>\n",
       "      <td>Время последней</td>\n",
       "      <td>Время последней сделки</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>time</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>6523</td>\n",
       "      <td>PRICEMINUSPREVWAPRICE</td>\n",
       "      <td>К оценке пред. дня</td>\n",
       "      <td>Цена последней сделки к оценке предыдущего дня</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6525</td>\n",
       "      <td>VOLTODAY</td>\n",
       "      <td>Объем в бумагах</td>\n",
       "      <td>Объем заключенных сделок в единицах ценных бум...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>6527</td>\n",
       "      <td>VALTODAY</td>\n",
       "      <td>Объем</td>\n",
       "      <td>Объем совершенных сделок, в валюте расчетов</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>6529</td>\n",
       "      <td>HIGHBID</td>\n",
       "      <td>Наибольшая цена спроса</td>\n",
       "      <td>Наибольшая цена спроса в течение торговой сессии</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>6531</td>\n",
       "      <td>LOWOFFER</td>\n",
       "      <td>Наименьшая цена предложения</td>\n",
       "      <td>Наименьшая цена предложения в течение торговой...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>6533</td>\n",
       "      <td>LASTOFFER</td>\n",
       "      <td>Предложение сессии</td>\n",
       "      <td>Лучшая котировка на продажу на момент завершен...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>number</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     id                   name                  short_title  \\\n",
       "0  6515                  SECID              Код инструмента   \n",
       "1  6517                BOARDID                   Код режима   \n",
       "2  6519         TRADINGSESSION              Торговая сессия   \n",
       "3  6521                   TIME              Время последней   \n",
       "4  6523  PRICEMINUSPREVWAPRICE           К оценке пред. дня   \n",
       "5  6525               VOLTODAY              Объем в бумагах   \n",
       "6  6527               VALTODAY                        Объем   \n",
       "7  6529                HIGHBID       Наибольшая цена спроса   \n",
       "8  6531               LOWOFFER  Наименьшая цена предложения   \n",
       "9  6533              LASTOFFER           Предложение сессии   \n",
       "\n",
       "                                               title  is_ordered  is_system  \\\n",
       "0              Идентификатор финансового инструмента           0          0   \n",
       "1                        Идентификатор режима торгов           0          0   \n",
       "2                                    Торговая сессия           0          0   \n",
       "3                             Время последней сделки           0          0   \n",
       "4     Цена последней сделки к оценке предыдущего дня           0          0   \n",
       "5  Объем заключенных сделок в единицах ценных бум...           0          0   \n",
       "6        Объем совершенных сделок, в валюте расчетов           0          0   \n",
       "7   Наибольшая цена спроса в течение торговой сессии           0          0   \n",
       "8  Наименьшая цена предложения в течение торговой...           0          0   \n",
       "9  Лучшая котировка на продажу на момент завершен...           0          0   \n",
       "\n",
       "   is_hidden trend_by  is_signed  has_percent    type  precision  is_linked  \n",
       "0          0     None          0            0  string        NaN          0  \n",
       "1          0     None          0            0  string        NaN          0  \n",
       "2          0     None          0            0  string        NaN          0  \n",
       "3          0     None          0            0    time        NaN          0  \n",
       "4          0     None          0            0  number        NaN          0  \n",
       "5          0     None          0            0  number        0.0          0  \n",
       "6          0     None          0            0  number        0.0          0  \n",
       "7          0     None          0            0  number        NaN          0  \n",
       "8          0     None          0            0  number        NaN          0  \n",
       "9          0     None          0            0  number        NaN          0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Возврат описания полей. Может быть полезно для анализа\n",
    "result = MOEX.request(44, engine=\"stock\", market=\"bonds\")\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "1db7caf4",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(44)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "id": "bc714fd0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "45: Получить справочник групп режимов торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "boardgroups: Группы режимов торгов\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/45\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boardgroups\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "fb49a047",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике\n",
    "FULL_ID.remove(45)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "4e0a8d57",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "46: Получить свечи указанного инструмента по выбранному режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "candles: Свечи в формате HLOCV\n",
      "\n",
      "Параметры запроса:\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``till``: Дата, до которой выводить данные.\r\n",
      "Формат: ГГГГ-ММ-ДД.. Значение по умолчанию: 2037-12-31\n",
      "``from``: Дата, начиная с которой необходимо начать выводить данные.\r\n",
      "Формат: ГГГГ-ММ-ДД.. \n",
      "``interval``: Интервал графика.. Значение по умолчанию: 10\n",
      "``iss.reverse``: Изменить порядок сортировки на обратный. Принимает значения true/false.. Значение по умолчанию: false\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/46\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities/{security}/candles\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "1b8e4e6b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>open</th>\n",
       "      <th>close</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>value</th>\n",
       "      <th>volume</th>\n",
       "      <th>begin</th>\n",
       "      <th>end</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>14620</td>\n",
       "      <td>14568</td>\n",
       "      <td>14638</td>\n",
       "      <td>14480</td>\n",
       "      <td>486325732</td>\n",
       "      <td>33419</td>\n",
       "      <td>2023-06-01 00:00:00</td>\n",
       "      <td>2023-06-01 17:38:29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>14538</td>\n",
       "      <td>14580</td>\n",
       "      <td>14588</td>\n",
       "      <td>14400</td>\n",
       "      <td>762081178</td>\n",
       "      <td>52560</td>\n",
       "      <td>2023-05-31 00:00:00</td>\n",
       "      <td>2023-05-31 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>14586</td>\n",
       "      <td>14574</td>\n",
       "      <td>14750</td>\n",
       "      <td>14526</td>\n",
       "      <td>939759858</td>\n",
       "      <td>64190</td>\n",
       "      <td>2023-05-30 00:00:00</td>\n",
       "      <td>2023-05-30 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>14684</td>\n",
       "      <td>14654</td>\n",
       "      <td>14796</td>\n",
       "      <td>14562</td>\n",
       "      <td>976281166</td>\n",
       "      <td>66642</td>\n",
       "      <td>2023-05-29 00:00:00</td>\n",
       "      <td>2023-05-29 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>14562</td>\n",
       "      <td>14670</td>\n",
       "      <td>14728</td>\n",
       "      <td>14552</td>\n",
       "      <td>774999220</td>\n",
       "      <td>52811</td>\n",
       "      <td>2023-05-26 00:00:00</td>\n",
       "      <td>2023-05-26 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>14736</td>\n",
       "      <td>14562</td>\n",
       "      <td>14736</td>\n",
       "      <td>14550</td>\n",
       "      <td>709017862</td>\n",
       "      <td>48575</td>\n",
       "      <td>2023-05-25 00:00:00</td>\n",
       "      <td>2023-05-25 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>14640</td>\n",
       "      <td>14696</td>\n",
       "      <td>14758</td>\n",
       "      <td>14564</td>\n",
       "      <td>786615576</td>\n",
       "      <td>53631</td>\n",
       "      <td>2023-05-24 00:00:00</td>\n",
       "      <td>2023-05-24 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>14620</td>\n",
       "      <td>14648</td>\n",
       "      <td>14684</td>\n",
       "      <td>14526</td>\n",
       "      <td>811575002</td>\n",
       "      <td>55576</td>\n",
       "      <td>2023-05-23 00:00:00</td>\n",
       "      <td>2023-05-23 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>14740</td>\n",
       "      <td>14602</td>\n",
       "      <td>14784</td>\n",
       "      <td>14580</td>\n",
       "      <td>566582616</td>\n",
       "      <td>38625</td>\n",
       "      <td>2023-05-22 00:00:00</td>\n",
       "      <td>2023-05-22 23:59:59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>14694</td>\n",
       "      <td>14730</td>\n",
       "      <td>14740</td>\n",
       "      <td>14520</td>\n",
       "      <td>1065736826</td>\n",
       "      <td>72821</td>\n",
       "      <td>2023-05-19 00:00:00</td>\n",
       "      <td>2023-05-19 23:59:59</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    open  close   high    low       value  volume                begin  \\\n",
       "0  14620  14568  14638  14480   486325732   33419  2023-06-01 00:00:00   \n",
       "1  14538  14580  14588  14400   762081178   52560  2023-05-31 00:00:00   \n",
       "2  14586  14574  14750  14526   939759858   64190  2023-05-30 00:00:00   \n",
       "3  14684  14654  14796  14562   976281166   66642  2023-05-29 00:00:00   \n",
       "4  14562  14670  14728  14552   774999220   52811  2023-05-26 00:00:00   \n",
       "5  14736  14562  14736  14550   709017862   48575  2023-05-25 00:00:00   \n",
       "6  14640  14696  14758  14564   786615576   53631  2023-05-24 00:00:00   \n",
       "7  14620  14648  14684  14526   811575002   55576  2023-05-23 00:00:00   \n",
       "8  14740  14602  14784  14580   566582616   38625  2023-05-22 00:00:00   \n",
       "9  14694  14730  14740  14520  1065736826   72821  2023-05-19 00:00:00   \n",
       "\n",
       "                   end  \n",
       "0  2023-06-01 17:38:29  \n",
       "1  2023-05-31 23:59:59  \n",
       "2  2023-05-30 23:59:59  \n",
       "3  2023-05-29 23:59:59  \n",
       "4  2023-05-26 23:59:59  \n",
       "5  2023-05-25 23:59:59  \n",
       "6  2023-05-24 23:59:59  \n",
       "7  2023-05-23 23:59:59  \n",
       "8  2023-05-22 23:59:59  \n",
       "9  2023-05-19 23:59:59  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Свечи: уже исторические данные\n",
    "result = MOEX.request(46, engine=\"stock\", market=\"shares\", board=\"TQBR\", security=\"GMKN\", interval=24,\n",
    "                      _from=\"2023-01-01\", \n",
    "                      iss__reverse=True\n",
    "                     )\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "f26a5ca1",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(46)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "id": "bf27767b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "48: Получить период дат рассчитанных свечей.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "borders: \n",
      "durations: Справочник доступных расчетных интервалов свечей в формате HLOCV\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/48\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities/{security}/candleborders\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "8619384a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>begin</th>\n",
       "      <th>end</th>\n",
       "      <th>interval</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2014-06-09 10:00:00</td>\n",
       "      <td>2023-06-01 17:59:59</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2010-04-01 00:00:00</td>\n",
       "      <td>2023-06-01 00:00:00</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2010-04-26 00:00:00</td>\n",
       "      <td>2023-06-01 00:00:00</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2014-06-09 10:00:00</td>\n",
       "      <td>2023-06-01 17:41:08</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2010-04-28 00:00:00</td>\n",
       "      <td>2023-06-01 17:41:09</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2010-04-01 00:00:00</td>\n",
       "      <td>2023-06-01 00:00:00</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2014-06-09 10:00:00</td>\n",
       "      <td>2023-06-01 17:41:08</td>\n",
       "      <td>60</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                 begin                  end  interval\n",
       "0  2014-06-09 10:00:00  2023-06-01 17:59:59         1\n",
       "1  2010-04-01 00:00:00  2023-06-01 00:00:00         4\n",
       "2  2010-04-26 00:00:00  2023-06-01 00:00:00         7\n",
       "3  2014-06-09 10:00:00  2023-06-01 17:41:08        10\n",
       "4  2010-04-28 00:00:00  2023-06-01 17:41:09        24\n",
       "5  2010-04-01 00:00:00  2023-06-01 00:00:00        31\n",
       "6  2014-06-09 10:00:00  2023-06-01 17:41:08        60"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Может быть полезно, для чека доступных свечек\n",
    "result = MOEX.request(48, engine=\"stock\", market=\"shares\", board=\"TQBR\", security=\"GMKN\", blocks=[\"borders\"])\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "id": "8bc6f79c",
   "metadata": {},
   "outputs": [],
   "source": [
    "FULL_ID.remove(48)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "42350d78",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "49: Получить описание режима торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "board: Описание режима торгов\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/49\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "7c407f62",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике\n",
    "FULL_ID.remove(49)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "d39cb983",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "50: Получить описание группы режимов торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'boardgroup']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "boardgroup: Описание группы режимов торгов\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/50\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boardgroups/{boardgroup}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "cf7fff2d",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Есть в справочнике\n",
    "FULL_ID.remove(50)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "id": "288cfa72",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "52: Получить данные по конкретному инструменту рынка.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Справочник полей таблицы со статическими данными торговой сессии рынка\n",
      "marketdata: Данные с текущими значениями инструментов рынка\n",
      "dataversion: Версионность данных.\n",
      "marketdata_yields: Доходности\n",
      "\n",
      "Параметры запроса:\n",
      "``primary_board``: Показывать инструменты - только для главного режима торгов по бумаге.\n",
      "Фильтр работает только для фондового (stock) и валютного (currency) рынка.\n",
      "Будьте осторожны используя данный фильтр за пределами основных режимов торгов.\n",
      "Список главных режимов торгов: https://iss.moex.com/iss/securities/ колонка \"primary_boardid\".. \n",
      "``assets``: Фильтр по коду базового актива (только для срочного рынка). Колонка ASSETCODE.\n",
      "Пример: https://iss.moex.com/iss/engines/futures/markets/forts/securities?assets=EURRUBTOM,AFLT\n",
      "Ограничения: не более 5 типов бумаг.. \n",
      "``index``: Выводить акции из базы индекса.\n",
      "Только для фондового рынка.. \n",
      "``security_collection``: Фильтр по коллекции. \n",
      "``previous_session``: Данные предыдущей сессии для forts и options рынков  . Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH (не более 10 инструментов).. \n",
      "``first``: Отдать n первых строк. Значение по умолчанию: 0\n",
      "``sort_column``: \n",
      "``sort_order``: Значение по умолчанию: asc\n",
      "``leaders``: Лидеры торгов (только для futures/options). Значение по умолчанию: 0\n",
      "``nearest``: Выводить фьючерсы с ближайшей датой погашения. Значение по умолчанию: 0\n",
      "``sectypes``: Фильтр по типу инструмента (только для срочного и фондового рынков).\n",
      "Например:\n",
      "  - https://iss.moex.com/iss/engines/futures/markets/forts/securities?sectypes=ri,gz\n",
      "  - https://iss.moex.com/iss/engines/stock/markets/bonds/securities?sectypes=8\n",
      "Ограничения: не более 5 типов бумаг.\n",
      "!! Для срочного рынка устарело. Используйте фильтр \"assets\".. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/52\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/securities/{security}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 142,
   "id": "9e551951",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Аналог id=34\n",
    "FULL_ID.remove(52)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "id": "187e129f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "53: Получить данные по указанному инструменту на выбранном режиме торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: Справочник полей таблицы со статическими данными торговой сессии рынка\n",
      "marketdata: Данные с текущими значениями инструментов рынка\n",
      "dataversion: Версионность данных.\n",
      "marketdata_yields: Доходности\n",
      "\n",
      "Параметры запроса:\n",
      "``primary_board``: Показывать инструменты - только для главного режима торгов по бумаге.\n",
      "Фильтр работает только для фондового (stock) и валютного (currency) рынка.\n",
      "Будьте осторожны используя данный фильтр за пределами основных режимов торгов.\n",
      "Список главных режимов торгов: https://iss.moex.com/iss/securities/ колонка \"primary_boardid\".. \n",
      "``assets``: Фильтр по коду базового актива (только для срочного рынка). Колонка ASSETCODE.\n",
      "Пример: https://iss.moex.com/iss/engines/futures/markets/forts/securities?assets=EURRUBTOM,AFLT\n",
      "Ограничения: не более 5 типов бумаг.. \n",
      "``index``: Выводить акции из базы индекса.\n",
      "Только для фондового рынка.. \n",
      "``security_collection``: Фильтр по коллекции. \n",
      "``previous_session``: Данные предыдущей сессии для forts и options рынков  . Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH (не более 10 инструментов).. \n",
      "``first``: Отдать n первых строк. Значение по умолчанию: 0\n",
      "``sort_column``: \n",
      "``sort_order``: Значение по умолчанию: asc\n",
      "``leaders``: Лидеры торгов (только для futures/options). Значение по умолчанию: 0\n",
      "``nearest``: Выводить фьючерсы с ближайшей датой погашения. Значение по умолчанию: 0\n",
      "``sectypes``: Фильтр по типу инструмента (только для срочного и фондового рынков).\n",
      "Например:\n",
      "  - https://iss.moex.com/iss/engines/futures/markets/forts/securities?sectypes=ri,gz\n",
      "  - https://iss.moex.com/iss/engines/stock/markets/bonds/securities?sectypes=8\n",
      "Ограничения: не более 5 типов бумаг.\n",
      "!! Для срочного рынка устарело. Используйте фильтр \"assets\".. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/53\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities/{security}\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "id": "f7ac56a9",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Аналог id=33\n",
    "FULL_ID.remove(53)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "61b56fcb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "55: Получить сделки по инструменту.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "trades: Перечень сделок\n",
      "dataversion: Версионность данных.\n",
      "trades_yields: Дополнительные доходности для сделок\n",
      "\n",
      "Параметры запроса:\n",
      "``tradeno``: Номер сделки, с которого следует начать возвращать данные.\n",
      "В данных возвращаются сделки начиная с номера переданной сделки переданого в параметре tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      "\n",
      "Сделки возвращаются в порядке их заключения. На срочном рынке номер более поздней сделки может быть менее номера предыдущей.\n",
      ". Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH. \n",
      "``limit``: Количество строк в данных. Доступные значения: 1, 10, 100, 1000, 5000. Значение по умолчанию: 5000\n",
      "``reversed``: обратный порядок сортировки. Значение по умолчанию: 0\n",
      "``previous_session``: Сделки предыдущей сессии для forts и options рынков.\n",
      "И для индексов.\n",
      ". Значение по умолчанию: 0\n",
      "``recno``: Только для срочного рынка (FORTS + OPTIONS).\n",
      "Фильтрация по полю RECNO (в порядке заключения сделок).\n",
      "\n",
      "Заменяет собой фильтр tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      ". Значение по умолчанию: 0\n",
      "``next_trade``: Не включать текущую сделку в выдачу.. Значение по умолчанию: 0\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``yielddatetype``: Тип доходности. Возможные значения\n",
      "- MBS\n",
      "- MATDATE\n",
      "- OFFERDATE. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/55\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/securities/{security}/trades\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "4d8ebb44",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Аналог id=35\n",
    "FULL_ID.remove(55)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "id": "e9cddcbe",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "56: Получить все сделки указанного инструмента по выбранному режиму торгов.\n",
      "Глобальные сущности запроса: ['engine', 'market', 'board', 'security']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "trades: Перечень сделок\n",
      "dataversion: Версионность данных.\n",
      "trades_yields: Дополнительные доходности для сделок\n",
      "\n",
      "Параметры запроса:\n",
      "``tradeno``: Номер сделки, с которого следует начать возвращать данные.\n",
      "В данных возвращаются сделки начиная с номера переданной сделки переданого в параметре tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      "\n",
      "Сделки возвращаются в порядке их заключения. На срочном рынке номер более поздней сделки может быть менее номера предыдущей.\n",
      ". Значение по умолчанию: 0\n",
      "``securities``: Фильтр-список инструментов. Получение данных производится только по инстурментам из списка securities. Например: securities=GAZP,AFLT,LKOH. \n",
      "``limit``: Количество строк в данных. Доступные значения: 1, 10, 100, 1000, 5000. Значение по умолчанию: 5000\n",
      "``reversed``: обратный порядок сортировки. Значение по умолчанию: 0\n",
      "``previous_session``: Сделки предыдущей сессии для forts и options рынков.\n",
      "И для индексов.\n",
      ". Значение по умолчанию: 0\n",
      "``recno``: Только для срочного рынка (FORTS + OPTIONS).\n",
      "Фильтрация по полю RECNO (в порядке заключения сделок).\n",
      "\n",
      "Заменяет собой фильтр tradeno.\n",
      "Если необходимо начать со следующей сделки - используйте параметр \"next_trade=1\".\n",
      ". Значение по умолчанию: 0\n",
      "``next_trade``: Не включать текущую сделку в выдачу.. Значение по умолчанию: 0\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "``yielddatetype``: Тип доходности. Возможные значения\n",
      "- MBS\n",
      "- MATDATE\n",
      "- OFFERDATE. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/56\n",
      "Темплейт: http://iss.moex.com/iss/engines/{engine}/markets/{market}/boards/{board}/securities/{security}/trades\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(FULL_ID[0], True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "id": "cb153f9a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>TRADEDATE</th>\n",
       "      <th>SHORTNAME</th>\n",
       "      <th>SECID</th>\n",
       "      <th>NUMTRADES</th>\n",
       "      <th>VALUE</th>\n",
       "      <th>OPEN</th>\n",
       "      <th>LOW</th>\n",
       "      <th>HIGH</th>\n",
       "      <th>LEGALCLOSEPRICE</th>\n",
       "      <th>...</th>\n",
       "      <th>MARKETPRICE2</th>\n",
       "      <th>MARKETPRICE3</th>\n",
       "      <th>ADMITTEDQUOTE</th>\n",
       "      <th>MP2VALTRD</th>\n",
       "      <th>MARKETPRICE3TRADESVALUE</th>\n",
       "      <th>ADMITTEDVALUE</th>\n",
       "      <th>WAVAL</th>\n",
       "      <th>TRADINGSESSION</th>\n",
       "      <th>CURRENCYID</th>\n",
       "      <th>TRENDCLSPR</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-02</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>4942</td>\n",
       "      <td>27666540</td>\n",
       "      <td>6.21</td>\n",
       "      <td>6.00</td>\n",
       "      <td>7.50</td>\n",
       "      <td>6.25</td>\n",
       "      <td>...</td>\n",
       "      <td>6.70</td>\n",
       "      <td>6.70</td>\n",
       "      <td>None</td>\n",
       "      <td>27666540</td>\n",
       "      <td>27666540</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>1.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-03</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>547</td>\n",
       "      <td>2873740</td>\n",
       "      <td>6.53</td>\n",
       "      <td>6.00</td>\n",
       "      <td>6.53</td>\n",
       "      <td>6.18</td>\n",
       "      <td>...</td>\n",
       "      <td>6.20</td>\n",
       "      <td>6.20</td>\n",
       "      <td>None</td>\n",
       "      <td>2873740</td>\n",
       "      <td>2873740</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>-0.48</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>2579</td>\n",
       "      <td>13574929</td>\n",
       "      <td>6.18</td>\n",
       "      <td>6.03</td>\n",
       "      <td>7.44</td>\n",
       "      <td>6.50</td>\n",
       "      <td>...</td>\n",
       "      <td>6.68</td>\n",
       "      <td>6.68</td>\n",
       "      <td>None</td>\n",
       "      <td>13574929</td>\n",
       "      <td>13574929</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>4.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-05</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>486</td>\n",
       "      <td>2685128</td>\n",
       "      <td>6.54</td>\n",
       "      <td>6.20</td>\n",
       "      <td>6.55</td>\n",
       "      <td>6.28</td>\n",
       "      <td>...</td>\n",
       "      <td>6.31</td>\n",
       "      <td>6.31</td>\n",
       "      <td>None</td>\n",
       "      <td>2685128</td>\n",
       "      <td>2685128</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>-3.38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-08</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>345</td>\n",
       "      <td>1645173</td>\n",
       "      <td>6.28</td>\n",
       "      <td>6.21</td>\n",
       "      <td>6.70</td>\n",
       "      <td>6.41</td>\n",
       "      <td>...</td>\n",
       "      <td>6.38</td>\n",
       "      <td>6.38</td>\n",
       "      <td>None</td>\n",
       "      <td>1645173</td>\n",
       "      <td>1645173</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>1.59</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-10</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>370</td>\n",
       "      <td>2039270</td>\n",
       "      <td>6.38</td>\n",
       "      <td>6.30</td>\n",
       "      <td>6.54</td>\n",
       "      <td>6.41</td>\n",
       "      <td>...</td>\n",
       "      <td>6.41</td>\n",
       "      <td>6.41</td>\n",
       "      <td>None</td>\n",
       "      <td>2039270</td>\n",
       "      <td>2039270</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>0.16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-11</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>514</td>\n",
       "      <td>2722085</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.39</td>\n",
       "      <td>6.89</td>\n",
       "      <td>6.54</td>\n",
       "      <td>...</td>\n",
       "      <td>6.60</td>\n",
       "      <td>6.60</td>\n",
       "      <td>None</td>\n",
       "      <td>2722085</td>\n",
       "      <td>2722085</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>2.35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-12</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>239</td>\n",
       "      <td>966852</td>\n",
       "      <td>6.54</td>\n",
       "      <td>6.45</td>\n",
       "      <td>6.68</td>\n",
       "      <td>6.52</td>\n",
       "      <td>...</td>\n",
       "      <td>6.52</td>\n",
       "      <td>6.52</td>\n",
       "      <td>None</td>\n",
       "      <td>966852</td>\n",
       "      <td>966852</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-15</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>225</td>\n",
       "      <td>1425937</td>\n",
       "      <td>6.60</td>\n",
       "      <td>6.44</td>\n",
       "      <td>6.70</td>\n",
       "      <td>6.60</td>\n",
       "      <td>...</td>\n",
       "      <td>6.54</td>\n",
       "      <td>6.54</td>\n",
       "      <td>None</td>\n",
       "      <td>1425937</td>\n",
       "      <td>1425937</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>1.22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>TQBR</td>\n",
       "      <td>2023-05-16</td>\n",
       "      <td>Арсагера</td>\n",
       "      <td>ARSA</td>\n",
       "      <td>2556</td>\n",
       "      <td>14699273</td>\n",
       "      <td>6.63</td>\n",
       "      <td>6.63</td>\n",
       "      <td>7.88</td>\n",
       "      <td>6.94</td>\n",
       "      <td>...</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.23</td>\n",
       "      <td>None</td>\n",
       "      <td>14699273</td>\n",
       "      <td>14699273</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>SUR</td>\n",
       "      <td>4.83</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>10 rows × 23 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  BOARDID   TRADEDATE SHORTNAME SECID  NUMTRADES     VALUE  OPEN   LOW  HIGH  \\\n",
       "0    TQBR  2023-05-02  Арсагера  ARSA       4942  27666540  6.21  6.00  7.50   \n",
       "1    TQBR  2023-05-03  Арсагера  ARSA        547   2873740  6.53  6.00  6.53   \n",
       "2    TQBR  2023-05-04  Арсагера  ARSA       2579  13574929  6.18  6.03  7.44   \n",
       "3    TQBR  2023-05-05  Арсагера  ARSA        486   2685128  6.54  6.20  6.55   \n",
       "4    TQBR  2023-05-08  Арсагера  ARSA        345   1645173  6.28  6.21  6.70   \n",
       "5    TQBR  2023-05-10  Арсагера  ARSA        370   2039270  6.38  6.30  6.54   \n",
       "6    TQBR  2023-05-11  Арсагера  ARSA        514   2722085  6.45  6.39  6.89   \n",
       "7    TQBR  2023-05-12  Арсагера  ARSA        239    966852  6.54  6.45  6.68   \n",
       "8    TQBR  2023-05-15  Арсагера  ARSA        225   1425937  6.60  6.44  6.70   \n",
       "9    TQBR  2023-05-16  Арсагера  ARSA       2556  14699273  6.63  6.63  7.88   \n",
       "\n",
       "   LEGALCLOSEPRICE  ...  MARKETPRICE2  MARKETPRICE3  ADMITTEDQUOTE  MP2VALTRD  \\\n",
       "0             6.25  ...          6.70          6.70           None   27666540   \n",
       "1             6.18  ...          6.20          6.20           None    2873740   \n",
       "2             6.50  ...          6.68          6.68           None   13574929   \n",
       "3             6.28  ...          6.31          6.31           None    2685128   \n",
       "4             6.41  ...          6.38          6.38           None    1645173   \n",
       "5             6.41  ...          6.41          6.41           None    2039270   \n",
       "6             6.54  ...          6.60          6.60           None    2722085   \n",
       "7             6.52  ...          6.52          6.52           None     966852   \n",
       "8             6.60  ...          6.54          6.54           None    1425937   \n",
       "9             6.94  ...          7.23          7.23           None   14699273   \n",
       "\n",
       "   MARKETPRICE3TRADESVALUE ADMITTEDVALUE  WAVAL  TRADINGSESSION CURRENCYID  \\\n",
       "0                 27666540          None      0               3        SUR   \n",
       "1                  2873740          None      0               3        SUR   \n",
       "2                 13574929          None      0               3        SUR   \n",
       "3                  2685128          None      0               3        SUR   \n",
       "4                  1645173          None      0               3        SUR   \n",
       "5                  2039270          None      0               3        SUR   \n",
       "6                  2722085          None      0               3        SUR   \n",
       "7                   966852          None      0               3        SUR   \n",
       "8                  1425937          None      0               3        SUR   \n",
       "9                 14699273          None      0               3        SUR   \n",
       "\n",
       "   TRENDCLSPR  \n",
       "0        1.63  \n",
       "1       -0.48  \n",
       "2        4.50  \n",
       "3       -3.38  \n",
       "4        1.59  \n",
       "5        0.16  \n",
       "6        2.35  \n",
       "7        0.00  \n",
       "8        1.22  \n",
       "9        4.83  \n",
       "\n",
       "[10 rows x 23 columns]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "result = MOEX.request(65, engine=\"stock\", market=\"shares\", security=\"ARSA\",  board=\"TQBR\",\n",
    "                      _from=\"2023-05-01\", tradingsession=3\n",
    "                     )\n",
    "print_df(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "id": "ac80b2ec",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "649: Текущие цены бумаг\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "currentprices: Текущие цены фондового рынка\n",
      "currentprices.dates: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Значение по умолчанию: today\n",
      "``start``: Значение по умолчанию: 0\n",
      "``tradingsession``: Фильтровать по типу торговой сессии:\n",
      "  1 - Утренняя сессия\n",
      "  1 - Основная сессия\n",
      "  2 - Вечерняя сессия\n",
      "  3 - Суммарно по всем сессиям\n",
      "По умолчанию показываются все сессии.. \n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/649\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/stock/currentprices\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(649, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "4654fd94",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "currentprices\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\projects/moex_research\\api_lib\\main.py:318: UserWarning: К API стучались 100 раз. Возвращены не все данные!!!\n",
      "  warnings.warn(f\"К API стучались {cnt} раз. Возвращены не все данные!!!\")\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>TRADEDATE</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>SECID</th>\n",
       "      <th>TRADETIME</th>\n",
       "      <th>CURPRICE</th>\n",
       "      <th>LASTPRICE</th>\n",
       "      <th>LEGALCLOSE</th>\n",
       "      <th>TRADINGSESSION</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>A-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>10427.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10427.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>AA-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>5182.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>5182.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>AAL-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>1200.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1200.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>AAP-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>16751.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>16751.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>AAPL-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>11984.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11984.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>ABBV-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>9705.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9705.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>ABC-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>11156.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>11156.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>ABNB-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>12200.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>12200.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>ABT-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>10000.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2023-05-19</td>\n",
       "      <td>FQBR</td>\n",
       "      <td>ACAD-RM</td>\n",
       "      <td>17:40:00</td>\n",
       "      <td>1300.0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1300.0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    TRADEDATE BOARDID    SECID TRADETIME  CURPRICE  LASTPRICE  LEGALCLOSE  \\\n",
       "0  2023-05-19    FQBR     A-RM  17:40:00   10427.0        0.0     10427.0   \n",
       "1  2023-05-19    FQBR    AA-RM  17:40:00    5182.0        0.0      5182.0   \n",
       "2  2023-05-19    FQBR   AAL-RM  17:40:00    1200.0        0.0      1200.0   \n",
       "3  2023-05-19    FQBR   AAP-RM  17:40:00   16751.0        0.0     16751.0   \n",
       "4  2023-05-19    FQBR  AAPL-RM  17:40:00   11984.0        0.0     11984.0   \n",
       "5  2023-05-19    FQBR  ABBV-RM  17:40:00    9705.0        0.0      9705.0   \n",
       "6  2023-05-19    FQBR   ABC-RM  17:40:00   11156.0        0.0     11156.0   \n",
       "7  2023-05-19    FQBR  ABNB-RM  17:40:00   12200.0        0.0     12200.0   \n",
       "8  2023-05-19    FQBR   ABT-RM  17:40:00   10000.0        0.0     10000.0   \n",
       "9  2023-05-19    FQBR  ACAD-RM  17:40:00    1300.0        0.0      1300.0   \n",
       "\n",
       "   TRADINGSESSION  \n",
       "0               1  \n",
       "1               1  \n",
       "2               1  \n",
       "3               1  \n",
       "4               1  \n",
       "5               1  \n",
       "6               1  \n",
       "7               1  \n",
       "8               1  \n",
       "9               1  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "currentprices.dates\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2009-09-01</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         from        till\n",
       "0  2009-09-01  2023-05-31"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(649, date=\"2023-05-19\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "id": "337e6939",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "881: Доска опционов\n",
      "Глобальные сущности запроса: ['asset']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "call: Список CALL опционов\n",
      "put: \n",
      "asset: Базовый актив - справочная информация\n",
      "\n",
      "Параметры запроса:\n",
      "``expiration_date``: Дата исполнения контракта. \n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/881\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/futures/markets/options/assets/{asset}/optionboard\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(881, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "id": "b52bc02d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "call\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SECID</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>STRIKE</th>\n",
       "      <th>THEORPRICE</th>\n",
       "      <th>VOLAT</th>\n",
       "      <th>LAST</th>\n",
       "      <th>BID</th>\n",
       "      <th>OFFER</th>\n",
       "      <th>VOLTODAY</th>\n",
       "      <th>OPENPOSITION</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GZ85CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>85.0</td>\n",
       "      <td>77.31</td>\n",
       "      <td>130.56676</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GZ90CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>90.0</td>\n",
       "      <td>72.32</td>\n",
       "      <td>130.03175</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GZ95CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>95.0</td>\n",
       "      <td>67.32</td>\n",
       "      <td>128.97380</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GZ100CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>100.0</td>\n",
       "      <td>62.34</td>\n",
       "      <td>127.04037</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GZ105CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>105.0</td>\n",
       "      <td>57.35</td>\n",
       "      <td>123.82407</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>GZ110CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>110.0</td>\n",
       "      <td>52.37</td>\n",
       "      <td>118.95440</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>GZ115CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>115.0</td>\n",
       "      <td>47.40</td>\n",
       "      <td>112.21195</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>GZ120CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>120.0</td>\n",
       "      <td>42.42</td>\n",
       "      <td>103.62689</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>GZ125CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>125.0</td>\n",
       "      <td>37.45</td>\n",
       "      <td>93.52507</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>GZ130CF3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>130.0</td>\n",
       "      <td>32.46</td>\n",
       "      <td>82.50258</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.02</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       SECID BOARDID  STRIKE  THEORPRICE      VOLAT  LAST   BID  OFFER  \\\n",
       "0   GZ85CF3B    ROPD    85.0       77.31  130.56676   NaN  0.02    NaN   \n",
       "1   GZ90CF3B    ROPD    90.0       72.32  130.03175   NaN  0.02    NaN   \n",
       "2   GZ95CF3B    ROPD    95.0       67.32  128.97380   NaN  0.02    NaN   \n",
       "3  GZ100CF3B    ROPD   100.0       62.34  127.04037   NaN  0.02    NaN   \n",
       "4  GZ105CF3B    ROPD   105.0       57.35  123.82407   NaN  0.02    NaN   \n",
       "5  GZ110CF3B    ROPD   110.0       52.37  118.95440   NaN  0.02    NaN   \n",
       "6  GZ115CF3B    ROPD   115.0       47.40  112.21195   NaN  0.02    NaN   \n",
       "7  GZ120CF3B    ROPD   120.0       42.42  103.62689   NaN  0.02    NaN   \n",
       "8  GZ125CF3B    ROPD   125.0       37.45   93.52507   NaN  0.02    NaN   \n",
       "9  GZ130CF3B    ROPD   130.0       32.46   82.50258   NaN  0.02    NaN   \n",
       "\n",
       "   VOLTODAY  OPENPOSITION  \n",
       "0       NaN           NaN  \n",
       "1       NaN           NaN  \n",
       "2       NaN           NaN  \n",
       "3       NaN           NaN  \n",
       "4       NaN           NaN  \n",
       "5       NaN           NaN  \n",
       "6       NaN           NaN  \n",
       "7       NaN           NaN  \n",
       "8       NaN           NaN  \n",
       "9       NaN           NaN  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "put\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SECID</th>\n",
       "      <th>BOARDID</th>\n",
       "      <th>STRIKE</th>\n",
       "      <th>THEORPRICE</th>\n",
       "      <th>VOLAT</th>\n",
       "      <th>LAST</th>\n",
       "      <th>BID</th>\n",
       "      <th>OFFER</th>\n",
       "      <th>VOLTODAY</th>\n",
       "      <th>OPENPOSITION</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GZ85CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>85.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>130.56676</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GZ90CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>90.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>130.03175</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GZ95CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>95.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>128.97380</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GZ100CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>100.0</td>\n",
       "      <td>0.01</td>\n",
       "      <td>127.04037</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GZ105CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>105.0</td>\n",
       "      <td>0.02</td>\n",
       "      <td>123.82407</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>GZ110CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>110.0</td>\n",
       "      <td>0.03</td>\n",
       "      <td>118.95440</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>GZ115CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>115.0</td>\n",
       "      <td>0.05</td>\n",
       "      <td>112.21195</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>GZ120CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>120.0</td>\n",
       "      <td>0.07</td>\n",
       "      <td>103.62689</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>GZ125CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>125.0</td>\n",
       "      <td>0.09</td>\n",
       "      <td>93.52507</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>GZ130CR3B</td>\n",
       "      <td>ROPD</td>\n",
       "      <td>130.0</td>\n",
       "      <td>0.10</td>\n",
       "      <td>82.50258</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4.6</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       SECID BOARDID  STRIKE  THEORPRICE      VOLAT  LAST  BID  OFFER  \\\n",
       "0   GZ85CR3B    ROPD    85.0        0.01  130.56676   NaN  NaN    4.6   \n",
       "1   GZ90CR3B    ROPD    90.0        0.01  130.03175   NaN  NaN    4.6   \n",
       "2   GZ95CR3B    ROPD    95.0        0.01  128.97380   NaN  NaN    4.6   \n",
       "3  GZ100CR3B    ROPD   100.0        0.01  127.04037   NaN  NaN    4.6   \n",
       "4  GZ105CR3B    ROPD   105.0        0.02  123.82407   NaN  NaN    4.6   \n",
       "5  GZ110CR3B    ROPD   110.0        0.03  118.95440   NaN  NaN    4.6   \n",
       "6  GZ115CR3B    ROPD   115.0        0.05  112.21195   NaN  NaN    4.6   \n",
       "7  GZ120CR3B    ROPD   120.0        0.07  103.62689   NaN  NaN    4.6   \n",
       "8  GZ125CR3B    ROPD   125.0        0.09   93.52507   NaN  NaN    4.6   \n",
       "9  GZ130CR3B    ROPD   130.0        0.10   82.50258   NaN  NaN    4.6   \n",
       "\n",
       "   VOLTODAY  OPENPOSITION  \n",
       "0       NaN           NaN  \n",
       "1       NaN           NaN  \n",
       "2       NaN           NaN  \n",
       "3       NaN           NaN  \n",
       "4       NaN           NaN  \n",
       "5       NaN           NaN  \n",
       "6       NaN           NaN  \n",
       "7       NaN           NaN  \n",
       "8       NaN           NaN  \n",
       "9       NaN           NaN  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "asset\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>CENTRALSTRIKE</th>\n",
       "      <th>UNDERLYINGASSET</th>\n",
       "      <th>UNDERLYINGTYPE</th>\n",
       "      <th>UNDERLYINGSETTLEPRICE</th>\n",
       "      <th>LASTDELDATE</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>160.0</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>S</td>\n",
       "      <td>162.2</td>\n",
       "      <td>2023-06-07</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   CENTRALSTRIKE UNDERLYINGASSET UNDERLYINGTYPE  UNDERLYINGSETTLEPRICE  \\\n",
       "0          160.0            GAZP              S                  162.2   \n",
       "\n",
       "  LASTDELDATE  \n",
       "0  2023-06-07  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(881, asset=\"GAZP\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "id": "2ed1f6a6",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "883: Открытые позиции по опционной серии\n",
      "Глобальные сущности запроса: ['asset']\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "open_positions: Количество открытых позиций\n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Значение по умолчанию: today\n",
      "``asset_type``: Фильтр по типу базового актива. (S - Опционы на акцию, F - Опционы на фьючерс). Значение по умолчанию: S\n",
      "``option_type``: Тип опциона: 'C' - Call, 'P' - Put.. Значение по умолчанию: C\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/883\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/futures/markets/options/assets/{asset}/openpositions\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(883, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "id": "c72ff25c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tradedate</th>\n",
       "      <th>asset</th>\n",
       "      <th>option_asset_type</th>\n",
       "      <th>option_type</th>\n",
       "      <th>is_fiz</th>\n",
       "      <th>persons_long</th>\n",
       "      <th>persons_short</th>\n",
       "      <th>open_position_long</th>\n",
       "      <th>open_position_short</th>\n",
       "      <th>oichange_long</th>\n",
       "      <th>oichange_short</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>S</td>\n",
       "      <td>C</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>645</td>\n",
       "      <td>821426</td>\n",
       "      <td>821187</td>\n",
       "      <td>42457</td>\n",
       "      <td>42812</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>S</td>\n",
       "      <td>C</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>162</td>\n",
       "      <td>21283</td>\n",
       "      <td>21522</td>\n",
       "      <td>-13067</td>\n",
       "      <td>-13422</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    tradedate asset option_asset_type option_type  is_fiz  persons_long  \\\n",
       "0  2023-05-31  GAZP                 S           C       0             2   \n",
       "1  2023-05-31  GAZP                 S           C       1            16   \n",
       "\n",
       "   persons_short  open_position_long  open_position_short  oichange_long  \\\n",
       "0            645              821426               821187          42457   \n",
       "1            162               21283                21522         -13067   \n",
       "\n",
       "   oichange_short  \n",
       "0           42812  \n",
       "1          -13422  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(883, asset=\"GAZP\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "id": "a49c62e3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "767: Сводная статистика по клиентам с самым высоким нетто-потоком. Детали https://fs.moex.com/f/10374/netflow2-demo-en.html\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "netflow2: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Значение по умолчанию: today\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/767\n",
      "Темплейт: http://iss.moex.com/iss/analyticalproducts/netflow2/securities\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(767, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 197,
   "id": "e4576e2d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>date</th>\n",
       "      <th>ticker</th>\n",
       "      <th>p30</th>\n",
       "      <th>p70</th>\n",
       "      <th>p100</th>\n",
       "      <th>pv30</th>\n",
       "      <th>pv70</th>\n",
       "      <th>pv100</th>\n",
       "      <th>vol</th>\n",
       "      <th>oi</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>AFKS</td>\n",
       "      <td>1503100</td>\n",
       "      <td>645900</td>\n",
       "      <td>447100</td>\n",
       "      <td>22891413</td>\n",
       "      <td>10056862</td>\n",
       "      <td>7043610</td>\n",
       "      <td>71439800</td>\n",
       "      <td>28767400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>AFLT</td>\n",
       "      <td>-1536770</td>\n",
       "      <td>-979340</td>\n",
       "      <td>-882440</td>\n",
       "      <td>-57210638</td>\n",
       "      <td>-36260908</td>\n",
       "      <td>-32764835</td>\n",
       "      <td>89004900</td>\n",
       "      <td>30517320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>ALRS</td>\n",
       "      <td>-164700</td>\n",
       "      <td>-151290</td>\n",
       "      <td>-92380</td>\n",
       "      <td>-10762463</td>\n",
       "      <td>-9866247</td>\n",
       "      <td>-5991695</td>\n",
       "      <td>8856840</td>\n",
       "      <td>4809000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>EUR</td>\n",
       "      <td>-34247000</td>\n",
       "      <td>-21844000</td>\n",
       "      <td>-17952000</td>\n",
       "      <td>-2969962297</td>\n",
       "      <td>-1892728157</td>\n",
       "      <td>-1553997207</td>\n",
       "      <td>1289750000</td>\n",
       "      <td>383506000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>EUR_RUB__TOD</td>\n",
       "      <td>-18286000</td>\n",
       "      <td>-10451000</td>\n",
       "      <td>-6990000</td>\n",
       "      <td>-1591792700</td>\n",
       "      <td>-909671615</td>\n",
       "      <td>-608391005</td>\n",
       "      <td>308260000</td>\n",
       "      <td>176446000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>EUR_RUB__TOM</td>\n",
       "      <td>-11070000</td>\n",
       "      <td>-6467000</td>\n",
       "      <td>-4728000</td>\n",
       "      <td>-955205480</td>\n",
       "      <td>-555263467</td>\n",
       "      <td>-404736415</td>\n",
       "      <td>981490000</td>\n",
       "      <td>292164000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>FEES</td>\n",
       "      <td>-88170000</td>\n",
       "      <td>-129110000</td>\n",
       "      <td>-106930000</td>\n",
       "      <td>-9237752</td>\n",
       "      <td>-13621796</td>\n",
       "      <td>-11298217</td>\n",
       "      <td>2900240000</td>\n",
       "      <td>1324620000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>FIVE</td>\n",
       "      <td>-5062</td>\n",
       "      <td>-8251</td>\n",
       "      <td>-8018</td>\n",
       "      <td>-7270057</td>\n",
       "      <td>-11852260</td>\n",
       "      <td>-11513574</td>\n",
       "      <td>135288</td>\n",
       "      <td>85808</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>-14130</td>\n",
       "      <td>27670</td>\n",
       "      <td>113720</td>\n",
       "      <td>-2409852</td>\n",
       "      <td>4682941</td>\n",
       "      <td>19684006</td>\n",
       "      <td>32412660</td>\n",
       "      <td>16074020</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>GMKN</td>\n",
       "      <td>-5181</td>\n",
       "      <td>-5883</td>\n",
       "      <td>-5524</td>\n",
       "      <td>-75001760</td>\n",
       "      <td>-85152486</td>\n",
       "      <td>-79938672</td>\n",
       "      <td>117752</td>\n",
       "      <td>66732</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         date        ticker       p30        p70       p100        pv30  \\\n",
       "0  2023-05-04          AFKS   1503100     645900     447100    22891413   \n",
       "1  2023-05-04          AFLT  -1536770    -979340    -882440   -57210638   \n",
       "2  2023-05-04          ALRS   -164700    -151290     -92380   -10762463   \n",
       "3  2023-05-04           EUR -34247000  -21844000  -17952000 -2969962297   \n",
       "4  2023-05-04  EUR_RUB__TOD -18286000  -10451000   -6990000 -1591792700   \n",
       "5  2023-05-04  EUR_RUB__TOM -11070000   -6467000   -4728000  -955205480   \n",
       "6  2023-05-04          FEES -88170000 -129110000 -106930000    -9237752   \n",
       "7  2023-05-04          FIVE     -5062      -8251      -8018    -7270057   \n",
       "8  2023-05-04          GAZP    -14130      27670     113720    -2409852   \n",
       "9  2023-05-04          GMKN     -5181      -5883      -5524   -75001760   \n",
       "\n",
       "         pv70       pv100         vol          oi  \n",
       "0    10056862     7043610    71439800    28767400  \n",
       "1   -36260908   -32764835    89004900    30517320  \n",
       "2    -9866247    -5991695     8856840     4809000  \n",
       "3 -1892728157 -1553997207  1289750000   383506000  \n",
       "4  -909671615  -608391005   308260000   176446000  \n",
       "5  -555263467  -404736415   981490000   292164000  \n",
       "6   -13621796   -11298217  2900240000  1324620000  \n",
       "7   -11852260   -11513574      135288       85808  \n",
       "8     4682941    19684006    32412660    16074020  \n",
       "9   -85152486   -79938672      117752       66732  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(767, date=\"2023-05-04\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 198,
   "id": "69f6af1b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "169: Средневзвешенные ставки по операциям центрального банка\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "date: \n",
      "dates: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Дата за которую необходимо вывести данные. \r\n",
      "Формат: ГГГГ-ММ-ДД.. Значение по умолчанию: today\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/169\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/state/markets/repo/cboper\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(169, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "id": "ab84e634",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "date\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>DAYS</th>\n",
       "      <th>TRADEDATE</th>\n",
       "      <th>WADEPSRATE</th>\n",
       "      <th>WAREPORATE</th>\n",
       "      <th>WAREPORATEFIXN</th>\n",
       "      <th>TITLE</th>\n",
       "      <th>DECIMALS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1_DAY</td>\n",
       "      <td>12/10</td>\n",
       "      <td>4.25</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>1 день *</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1_WEEK</td>\n",
       "      <td>12/10</td>\n",
       "      <td>4.00</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>1 неделя **</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1_YEAR</td>\n",
       "      <td>12/10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>1 год</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3_MONTHS</td>\n",
       "      <td>12/10</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>3 месяца</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4_WEEKS</td>\n",
       "      <td>12/10</td>\n",
       "      <td>0.00</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>4 недели</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>6_MONTHS</td>\n",
       "      <td>12/10</td>\n",
       "      <td>NaN</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>6 месяцев</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       DAYS TRADEDATE  WADEPSRATE WAREPORATE WAREPORATEFIXN        TITLE  \\\n",
       "0     1_DAY     12/10        4.25       None           None     1 день *   \n",
       "1    1_WEEK     12/10        4.00       None           None  1 неделя **   \n",
       "2    1_YEAR     12/10         NaN       None           None        1 год   \n",
       "3  3_MONTHS     12/10        0.00       None           None     3 месяца   \n",
       "4   4_WEEKS     12/10        0.00       None           None     4 недели   \n",
       "5  6_MONTHS     12/10         NaN       None           None    6 месяцев   \n",
       "\n",
       "   DECIMALS  \n",
       "0         2  \n",
       "1         2  \n",
       "2         2  \n",
       "3         2  \n",
       "4         2  \n",
       "5         2  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dates\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>FROM</th>\n",
       "      <th>TILL</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2005-06-21</td>\n",
       "      <td>2012-10-12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         FROM        TILL\n",
       "0  2005-06-21  2012-10-12"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Старье\n",
    "print_df(MOEX.request(169))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "id": "dc8cb638",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "172: Коэффициенты корелляции фондового рынка\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "coefficients: Коэффициенты корелляции фондового рынка\n",
      "coefficients.cursor: \n",
      "coefficients.dates: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Дата за которую необходимо вывести данные. Формат: ГГГГ-ММ-ДД.. Значение по умолчанию: today\n",
      "``start``: Значение по умолчанию: 0\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/172\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/stock/markets/shares/correlations\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(172, True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "id": "fae10b0f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "coefficients\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\projects/moex_research\\api_lib\\main.py:281: UserWarning: К API стучались 100 раз. Возвращены не все данные!!!\n",
      "  warnings.warn(f\"К API стучались {cnt} раз. Возвращены не все данные!!!\")\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>SECID</th>\n",
       "      <th>FXSECID</th>\n",
       "      <th>TRADEDATE</th>\n",
       "      <th>COEFF_CORRELATION</th>\n",
       "      <th>COEFF_BETA</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>GAZP</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.2735</td>\n",
       "      <td>0.7723</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>GMKN</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.4225</td>\n",
       "      <td>1.2850</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>IDVP</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>-0.1188</td>\n",
       "      <td>-0.1748</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>IMOEX</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.4124</td>\n",
       "      <td>1.5329</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>IMOEX2</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.3267</td>\n",
       "      <td>1.0955</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>LKOH</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.2658</td>\n",
       "      <td>0.6815</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>MOEX10</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.4373</td>\n",
       "      <td>1.6089</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>MOEXBC</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.3938</td>\n",
       "      <td>1.4519</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>MOEXBMI</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.4220</td>\n",
       "      <td>1.5748</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>ABRD</td>\n",
       "      <td>MOEXCH</td>\n",
       "      <td>2023-05-04</td>\n",
       "      <td>0.3483</td>\n",
       "      <td>1.2509</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  SECID  FXSECID   TRADEDATE  COEFF_CORRELATION  COEFF_BETA\n",
       "0  ABRD     GAZP  2023-05-04             0.2735      0.7723\n",
       "1  ABRD     GMKN  2023-05-04             0.4225      1.2850\n",
       "2  ABRD     IDVP  2023-05-04            -0.1188     -0.1748\n",
       "3  ABRD    IMOEX  2023-05-04             0.4124      1.5329\n",
       "4  ABRD   IMOEX2  2023-05-04             0.3267      1.0955\n",
       "5  ABRD     LKOH  2023-05-04             0.2658      0.6815\n",
       "6  ABRD   MOEX10  2023-05-04             0.4373      1.6089\n",
       "7  ABRD   MOEXBC  2023-05-04             0.3938      1.4519\n",
       "8  ABRD  MOEXBMI  2023-05-04             0.4220      1.5748\n",
       "9  ABRD   MOEXCH  2023-05-04             0.3483      1.2509"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "coefficients.dates\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2010-02-27</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         from        till\n",
       "0  2010-02-27  2023-05-31"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(172, date=\"2023-05-04\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 208,
   "id": "00e9af5b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "843: RUSFAR расшифровка показателей\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "analytics.columns: \n",
      "analytics: \n",
      "analytics.dates: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: дата за которую необходимо отобразить данные.\n",
      "По умолчанию за последнюю дату в итогах торгов.. Значение по умолчанию: today\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/843\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/stock/markets/index/rusfar\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(843, True) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 209,
   "id": "724f3a83",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "analytics.columns\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Column</th>\n",
       "      <th>Russian</th>\n",
       "      <th>English</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>tradedate</td>\n",
       "      <td>Дата расчета</td>\n",
       "      <td>Calculation date</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>secid</td>\n",
       "      <td>Код инструмента</td>\n",
       "      <td>Instrument ID</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Numtrades</td>\n",
       "      <td>Количество сделок</td>\n",
       "      <td>Trades count</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>AvgTradesVol</td>\n",
       "      <td>Средний объем сделок</td>\n",
       "      <td>Average trades volume</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>MinTradePrice</td>\n",
       "      <td>Минимальная цена сделок</td>\n",
       "      <td>Min deal price</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>MaxTradePrice</td>\n",
       "      <td>Максимальная цена сделок</td>\n",
       "      <td>Max deal price</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Vol</td>\n",
       "      <td>Объем сделок</td>\n",
       "      <td>Trades volume</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>minVol</td>\n",
       "      <td>Мин.объем сделок, необходимый для учета заявок...</td>\n",
       "      <td>Min trades volume, required for orders count f...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>VolShare</td>\n",
       "      <td>Доля сделок в расчете, %</td>\n",
       "      <td>Trades Volume in count, %</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>VolOrders</td>\n",
       "      <td>Доля заявок в расчете, %</td>\n",
       "      <td>Orders Volume in count, %</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          Column                                            Russian  \\\n",
       "0      tradedate                                       Дата расчета   \n",
       "1          secid                                    Код инструмента   \n",
       "2      Numtrades                                  Количество сделок   \n",
       "3   AvgTradesVol                               Средний объем сделок   \n",
       "4  MinTradePrice                            Минимальная цена сделок   \n",
       "5  MaxTradePrice                           Максимальная цена сделок   \n",
       "6            Vol                                       Объем сделок   \n",
       "7         minVol  Мин.объем сделок, необходимый для учета заявок...   \n",
       "8       VolShare                           Доля сделок в расчете, %   \n",
       "9      VolOrders                           Доля заявок в расчете, %   \n",
       "\n",
       "                                             English  \n",
       "0                                   Calculation date  \n",
       "1                                      Instrument ID  \n",
       "2                                       Trades count  \n",
       "3                              Average trades volume  \n",
       "4                                     Min deal price  \n",
       "5                                     Max deal price  \n",
       "6                                      Trades volume  \n",
       "7  Min trades volume, required for orders count f...  \n",
       "8                          Trades Volume in count, %  \n",
       "9                          Orders Volume in count, %  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "analytics\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tradedate</th>\n",
       "      <th>secid</th>\n",
       "      <th>Numtrades</th>\n",
       "      <th>AvgTradesVol</th>\n",
       "      <th>MinTradePrice</th>\n",
       "      <th>MaxTradePrice</th>\n",
       "      <th>Vol</th>\n",
       "      <th>MinVol</th>\n",
       "      <th>VolShare</th>\n",
       "      <th>VolOrders</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFAR</td>\n",
       "      <td>394</td>\n",
       "      <td>381497193</td>\n",
       "      <td>7.20</td>\n",
       "      <td>7.25</td>\n",
       "      <td>1.503099e+11</td>\n",
       "      <td>30000000000</td>\n",
       "      <td>100.00</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFAR1M</td>\n",
       "      <td>8</td>\n",
       "      <td>61406250</td>\n",
       "      <td>7.40</td>\n",
       "      <td>7.41</td>\n",
       "      <td>4.912500e+08</td>\n",
       "      <td>30000000000</td>\n",
       "      <td>1.64</td>\n",
       "      <td>98.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFAR1W</td>\n",
       "      <td>41</td>\n",
       "      <td>665488415</td>\n",
       "      <td>7.23</td>\n",
       "      <td>7.30</td>\n",
       "      <td>2.728502e+10</td>\n",
       "      <td>30000000000</td>\n",
       "      <td>90.95</td>\n",
       "      <td>9.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFAR2W</td>\n",
       "      <td>12</td>\n",
       "      <td>300000000</td>\n",
       "      <td>7.30</td>\n",
       "      <td>7.30</td>\n",
       "      <td>3.600000e+09</td>\n",
       "      <td>30000000000</td>\n",
       "      <td>12.00</td>\n",
       "      <td>88.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFAR3M</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.000000e+00</td>\n",
       "      <td>30000000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>100.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2023-06-01</td>\n",
       "      <td>RUSFARCNY</td>\n",
       "      <td>91</td>\n",
       "      <td>30573577</td>\n",
       "      <td>0.54</td>\n",
       "      <td>0.75</td>\n",
       "      <td>2.782196e+09</td>\n",
       "      <td>200000000</td>\n",
       "      <td>100.00</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    tradedate      secid  Numtrades  AvgTradesVol  MinTradePrice  \\\n",
       "0  2023-06-01     RUSFAR        394     381497193           7.20   \n",
       "1  2023-06-01   RUSFAR1M          8      61406250           7.40   \n",
       "2  2023-06-01   RUSFAR1W         41     665488415           7.23   \n",
       "3  2023-06-01   RUSFAR2W         12     300000000           7.30   \n",
       "4  2023-06-01   RUSFAR3M          0             0           0.00   \n",
       "5  2023-06-01  RUSFARCNY         91      30573577           0.54   \n",
       "\n",
       "   MaxTradePrice           Vol       MinVol  VolShare  VolOrders  \n",
       "0           7.25  1.503099e+11  30000000000    100.00       0.00  \n",
       "1           7.41  4.912500e+08  30000000000      1.64      98.36  \n",
       "2           7.30  2.728502e+10  30000000000     90.95       9.05  \n",
       "3           7.30  3.600000e+09  30000000000     12.00      88.00  \n",
       "4           0.00  0.000000e+00  30000000000      0.00     100.00  \n",
       "5           0.75  2.782196e+09    200000000    100.00       0.00  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "analytics.dates\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-01-25</td>\n",
       "      <td>2023-06-01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         from        till\n",
       "0  2021-01-25  2023-06-01"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(843))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "id": "587096e4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "134: Показатели для определения критериев существенного отклонения\n",
      "\n",
      "Возвращаемые поинтом данные:\n",
      "securities: \n",
      "securities.cursor: \n",
      "securities.dates: \n",
      "\n",
      "Параметры запроса:\n",
      "``date``: Дата за которую необходимо вывести данные. \r\n",
      "Формат: ГГГГ-ММ-ДД.. Значение по умолчанию: today\n",
      "``start``: Номер строки (отсчет с нуля), с которой следует начать порцию возвращаемых данных (см. рук-во разработчика).\n",
      "Получение ответа без данных означает, что указанное значение превышает число строк, возвращаемых запросом.. Значение по умолчанию: 0\n",
      "\n",
      "Эндпоинт возвращает ограниченное количество записей\n",
      "\n",
      "Детали: http://iss.moex.com/iss/reference/134\n",
      "Темплейт: http://iss.moex.com/iss/statistics/engines/stock/deviationcoeffs\n"
     ]
    }
   ],
   "source": [
    "MOEX.api_description(134, True) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "id": "a49f2867",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securities\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\projects/moex_research\\api_lib\\main.py:281: UserWarning: К API стучались 100 раз. Возвращены не все данные!!!\n",
      "  warnings.warn(f\"К API стучались {cnt} раз. Возвращены не все данные!!!\")\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tradedate</th>\n",
       "      <th>secid</th>\n",
       "      <th>liquidity</th>\n",
       "      <th>sigma</th>\n",
       "      <th>beta</th>\n",
       "      <th>f_plus</th>\n",
       "      <th>f_minus</th>\n",
       "      <th>spread</th>\n",
       "      <th>coeff_c</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>ABRD</td>\n",
       "      <td>L</td>\n",
       "      <td>0.025114</td>\n",
       "      <td>0.821507</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AFKS</td>\n",
       "      <td>L</td>\n",
       "      <td>0.016671</td>\n",
       "      <td>0.823584</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AFLT</td>\n",
       "      <td>L</td>\n",
       "      <td>0.023203</td>\n",
       "      <td>1.464660</td>\n",
       "      <td>0.012124</td>\n",
       "      <td>0.50</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AGRO</td>\n",
       "      <td>L</td>\n",
       "      <td>0.016906</td>\n",
       "      <td>1.055970</td>\n",
       "      <td>0.010103</td>\n",
       "      <td>0.25</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKGD</td>\n",
       "      <td>L</td>\n",
       "      <td>0.010438</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKMB</td>\n",
       "      <td>L</td>\n",
       "      <td>0.002276</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKME</td>\n",
       "      <td>L</td>\n",
       "      <td>0.010555</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKMM</td>\n",
       "      <td>L</td>\n",
       "      <td>0.000261</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKQU</td>\n",
       "      <td>N</td>\n",
       "      <td>0.014600</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.01972</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2023-05-31</td>\n",
       "      <td>AKRN</td>\n",
       "      <td>L</td>\n",
       "      <td>0.009281</td>\n",
       "      <td>0.287563</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00000</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    tradedate secid liquidity     sigma      beta    f_plus  f_minus   spread  \\\n",
       "0  2023-05-31  ABRD         L  0.025114  0.821507  0.000000     0.00  0.00000   \n",
       "1  2023-05-31  AFKS         L  0.016671  0.823584  0.000000     0.00  0.00000   \n",
       "2  2023-05-31  AFLT         L  0.023203  1.464660  0.012124     0.50  0.00000   \n",
       "3  2023-05-31  AGRO         L  0.016906  1.055970  0.010103     0.25  0.00000   \n",
       "4  2023-05-31  AKGD         L  0.010438  0.000000  0.000000     0.00  0.00000   \n",
       "5  2023-05-31  AKMB         L  0.002276  0.000000  0.000000     0.00  0.00000   \n",
       "6  2023-05-31  AKME         L  0.010555  0.000000  0.000000     0.00  0.00000   \n",
       "7  2023-05-31  AKMM         L  0.000261  0.000000  0.000000     0.00  0.00000   \n",
       "8  2023-05-31  AKQU         N  0.014600  0.000000  0.000000     0.00  0.01972   \n",
       "9  2023-05-31  AKRN         L  0.009281  0.287563  0.000000     0.00  0.00000   \n",
       "\n",
       "   coeff_c  \n",
       "0      0.0  \n",
       "1      0.0  \n",
       "2      0.0  \n",
       "3      0.0  \n",
       "4      0.0  \n",
       "5      0.0  \n",
       "6      0.0  \n",
       "7      0.0  \n",
       "8      0.0  \n",
       "9      0.0  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "securities.dates\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>from</th>\n",
       "      <th>till</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2011-01-24</td>\n",
       "      <td>2023-05-31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "         from        till\n",
       "0  2011-01-24  2023-05-31"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "print_df(MOEX.request(134))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "id": "fd0807f2",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5 Список бумаг торгуемых на московской бирже.\n",
      "13 Получить спецификацию инструмента.\n",
      "24 Получить сводные обороты по рынкам\n",
      "26 Получить интервал дат, доступных в истории для рынка по заданному режиму торгов.\n",
      "28 Получить глобальные справочники ISS.\n",
      "32 Получить таблицу инструментов по режиму торгов.\n",
      "33 Получить таблицу инструментов торговой сессии по рынку в целом.\n",
      "34 Получить все сделки по выбранному режиму торгов.\n",
      "35 Получить все сделки рынка.\n",
      "40 Получить доступные торговые системы.\n",
      "41 Получить описание и режим работы торговой системы.\n",
      "42 Получить список рынков торговой системы.\n",
      "43 Получить справочник режимов торгов рынка.\n",
      "44 Получить описание: словарь доступных режимов торгов, описание полей публикуемых таблиц данных и т.д.\n",
      "45 Получить справочник групп режимов торгов.\n",
      "46 Получить свечи указанного инструмента по выбранному режиму торгов.\n",
      "48 Получить период дат рассчитанных свечей.\n",
      "49 Получить описание режима торгов.\n",
      "50 Получить описание группы режимов торгов.\n",
      "52 Получить данные по конкретному инструменту рынка.\n",
      "53 Получить данные по указанному инструменту на выбранном режиме торгов.\n",
      "55 Получить сделки по инструменту.\n",
      "56 Получить все сделки указанного инструмента по выбранному режиму торгов.\n",
      "61 Получить интервал дат в истории для указанного рынка и бумаги.\n",
      "62 Получить историю по всем бумагам на рынке за одну дату.\n",
      "63 Получить историю по одной бумаге на рынке за интервал дат.\n",
      "64 Получить историю торгов для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "65 Получить историю торгов для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "66 Получить интервал дат в истории, за которые доступна указанная бумага на рынке на указанном режиме торгов.\n",
      "83 Получить даты, за которые доступны данные на указанных рынке и торговой системе.\n",
      "89 Получить данные по кривой бескупонной доходности(Прекращены расчеты с 2018-01-03)\n",
      "95 Получить текущее значение оборотов торговой сессии по рынкам торговой системы\n",
      "96 Получить текущее значение оборота по рынку\n",
      "100 Получить описание полей для запросов оборотов по рынку/торговой системе.\n",
      "114 Список годов, за которые существуют ссылки на файлы с архивом сделок и исторической биржевой информацией. datatype может принимать значения securities или trades.\n",
      "115 Список месяцев в году, за которые существуют ссылки на файлы с архивом сделок и исторической биржевой информацией. datatype может принимать значения securities или trades.\n",
      "118 Список неторгуемых инструментов с указанием интервалов торгуемости по режимам\n",
      "119 Получить данные по листингу бумаг в историческом разрезе по указанному режиму\n",
      "123 Информация по техническому изменению торговых кодов\n",
      "127 Группы ценных бумаг\n",
      "128 Группа ценных бумаг\n",
      "129 Коллекции ценных бумаг входящие в группу\n",
      "130 Коллекция ценных бумаг входящие в группу\n",
      "131 Описание инструментов\n",
      "134 Показатели для определения критериев существенного отклонения\n",
      "146 Индексы фондового рынка\n",
      "147 Аналитические показатели за дату\n",
      "148 Список тикеров за все время торгов\n",
      "155 Получить свечи указанного инструмента по дефолтной группе режимов.\n",
      "156 Интервалы свечей, доступных к запросу по ФИ\n",
      "157 Получить свечи указанного инструмента по выбранной группе режимов торгов.\n",
      "159 Капитализация фондового рынка\n",
      "160 Список индексов в которые входит бумага\n",
      "161 Список режимов обобщенной информации по фондовому рынку\n",
      "162 Обобщенная информация по фондовому рынку\n",
      "165 РЕПО ГЦБ объемы (УСТАРЕЛО)\n",
      "166 РЕПО ГЦБ детали (УСТАРЕЛО)\n",
      "168 Курсы ЦБРФ\n",
      "169 Средневзвешенные ставки по операциям центрального банка\n",
      "171 Cписок акций, по которым рассчитывается рыночная котировка\n",
      "172 Коэффициенты корелляции фондового рынка\n",
      "178 Ставки РЕПО аукционов (ГЦБ)\n",
      "179 Описание полей для запроса ставок РЕПО аукционов (ГЦБ)\n",
      "191 Новости биржи\n",
      "192 Новость сайта\n",
      "193 Мероприятия биржи\n",
      "194 Контент мероприятия биржи\n",
      "195 Агрегированные показатели рынка облигаций\n",
      "196 Описание колонок по агрегированным показетелям рынка бондов\n",
      "205 Описание колонок бумаг входящих в индекс\n",
      "214 Агрегированные итоги торгов за дату по рынкам\n",
      "634 Кривые безкупонной доходности\n",
      "649 Текущие цены бумаг\n",
      "711 Индикативные курсы валют срочного рынка\n",
      "712 Индикативный курс валют срочного рынка\n",
      "715 Фиксинги Московской биржи\n",
      "716 Фиксинги Московской биржи\n",
      "758 Справочник дроблений и консолидаций бумаг фондового рынка\n",
      "767 Сводная статистика по клиентам с самым высоким нетто-потоком. Детали https://fs.moex.com/f/10374/netflow2-demo-en.html\n",
      "769 Сводная статистика по клиентам с самым высоким нетто-потоком. Запрос возможен с лагом -15 дней от текущего для 1 эшелона. Детали https://fs.moex.com/f/10374/netflow2-demo-en.html\n",
      "783 История изменения параметров КБД (Кривая Бескупоной Доходности).\n",
      "791 Получить историю рассчитанных доходностей для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "793 Получить историю доходностей по одной бумаге на рынке за интервал дат.\n",
      "795 Получить историю доходностей для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "797 Получить историю доходностей для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "807 Сводные остатки по фьючерсам на физ. и юр. лица.\n",
      "809 Сводные остатки по фьючерсам на физ. и юр. лица. Запрос возможен с лагом -15 дней, по коду фьючерса\n",
      "811 Список сессий доступных в итогах торгов. Только для фондового рынка!\n",
      "813 Получить историю по всем бумагам на рынке за одну дату.\n",
      "815 Получить историю торгов для указанной бумаги на указанном режиме торгов за указанный интервал дат.\n",
      "817 Получить историю по одной бумаге на рынке за интервал дат.\n",
      "821 Получить историю торгов для всех бумаг на указанном режиме торгов отфильтрованных по дате.\n",
      "823 Промежуточные \"Итоги дня\". Только для фондового рынка\n",
      "839 Бюллетени для индексов\n",
      "843 RUSFAR расшифровка показателей\n",
      "859 Будущие ставки для ценообразования нестандартных инструментов (деривативов)\n",
      "861 Будущие ставки для ценообразования нестандартных инструментов (деривативов)\n",
      "873 Опционные серии\n",
      "877 Опционные серии\n",
      "879 Объем торгов для опционной серии\n",
      "881 Доска опционов\n",
      "883 Открытые позиции по опционной серии\n",
      "885 Объем торгов для опционной серии\n",
      "923 Календарь расчетных дней\n",
      "927 Своп-кривые на рынке СПФИ\n",
      "933 НКД на конец месяца\n"
     ]
    }
   ],
   "source": [
    "MOEX.all_api()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5c3c3ccd",
   "metadata": {},
   "source": [
    "### Итого.\n",
    "\n",
    "1. Убедились, что написанная библиотека для удобного запроса данных с апи работает. Вам даже не нужно знать как работать с REST-API.\n",
    "2. Множество поинтов дублирует друг друга, по сути все можно смело разделить на 3.\n",
    "3. К сожалению, нет доступа к тиковым данным истории. Можно запросить данные только за последнюю сессию.\n",
    "4. Можно выцепить много полезной инфы из коротких свечек (минута), есть показатели ликвидности, статитстика по крупнякам, доходностям, расшифровок бенчмарков, остаткам на счетах по срочке, истории по площадкам.\n",
    "5. Нет доступа к ордерлогам, к сожению, также платно.\n",
    "6. Из минусов - библиотека не юзает асинхронку. Боюсь ее использование может вызвать отклонение запросов со стороны Биржи (ddos).\n",
    "\n",
    "#### В следующей - заключительной части поиграем с данными. Порисуем графики, посмотрим корреляции между спотом и остатками срочки, крупняками; прочими интересными наблюдениями.\n",
    "\n",
    "\n",
    "### Надеюсь, данная библиотека будет полезна для вас."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
